Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59934

Re: Oh look, another language (ceylon)

References (6 earlier) <mailman.2831.1384769090.18130.python-list@python.org> <528a16b5$0$29992$c3e8da3$5496439d@news.astraweb.com> <528a249e$0$29992$c3e8da3$5496439d@news.astraweb.com> <mailman.2868.1384817102.18130.python-list@python.org> <528ac93d$0$11089$c3e8da3@news.astraweb.com>
Date 2013-11-19 13:54 +1100
Subject Re: Oh look, another language (ceylon)
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2876.1384829701.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Nov 19, 2013 at 1:13 PM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Tue, 19 Nov 2013 10:25:00 +1100, Chris Angelico wrote:
>
>> But the problem is also with strings coming back from JS.
>
> Just because you call it a "string" in Ceylon, doesn't mean you have to
> use the native Javascript string type unchanged.

Indeed not, but there are going to be many MANY cases where a JS
string has to become a Ceylon string and vice versa - a lot more often
than CPython drops to C. For instance, suppose you run your Ceylon
code inside a web browser. Pick up pretty much any piece of JavaScript
code from any web page - how much string manipulation does it do, and
how much does it call on various DOM methods? In CPython, only a small
number of Python functions will end up dropping to C APIs to do their
work (and most of those will have to do some manipulation along the
way somewhere - eg chances are print()/sys.stdout.write() will
eventually have to encode its output to 8-bit before passing it to
some byte-oriented underlying stream, so the actual representation of
a Python string doesn't matter); in browser-based work, that is
inverted.

However, Ceylon can actually be implemented on multiple backends (Java
and JavaScript listed). It's fully possible that an
"application-oriented" backend might use Pike-strings internally,
while a "browser-oriented" backend could still use the underlying
string representation. The questions are entirely of performance,
since it's been guaranteed already to have the same semantics.

I would really like to see JavaScript replaced in web browsers, since
the ECMAScript folks have stated explicitly (in response to a question
from me) that UTF-16 representation *must* stay, for backward compat.
JS is a reasonable language - it's not terrible - but it has a number
of glaring flaws. Ceylon could potentially be implemented in browsers,
using Pike-strings internally, and then someone could write a
JavaScript engine that compiles to Ceylon (complete with
bug-compatibility stupid-code that encodes all strings UTF-16 before
indexing into them). It would be an overall improvement, methinks.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Oh look, another language (ceylon) Neal Becker <ndbecker2@gmail.com> - 2013-11-13 14:33 -0500
  Re: Oh look, another language (ceylon) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-11-17 16:41 +1300
    Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-17 15:10 +1100
    Re: Oh look, another language (ceylon) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-17 05:48 +0000
      Re: Oh look, another language (ceylon) jkn <jkn_gg@nicorp.f9.co.uk> - 2013-11-17 00:34 -0800
    Re: Oh look, another language (ceylon) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-17 12:41 +0000
      Re: Oh look, another language (ceylon) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-11-18 11:33 +1300
        Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-18 11:42 +1100
        Re: Oh look, another language (ceylon) Tim Daneliuk <tundra@tundraware.com> - 2013-11-17 16:48 -0600
          Re: Oh look, another language (ceylon) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-18 23:51 +0000
            Re: Oh look, another language (ceylon) Tim Daneliuk <tundra@tundraware.com> - 2013-11-18 18:31 -0600
    Re: Oh look, another language (ceylon) Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-17 16:18 -0800
      Re: Oh look, another language (ceylon) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-11-18 19:45 +1300
        Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-18 17:56 +1100
          Re: Oh look, another language (ceylon) wxjmfauth@gmail.com - 2013-11-18 01:44 -0800
            Re: Oh look, another language (ceylon) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-18 09:56 +0000
            Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-18 21:04 +1100
              Re: Oh look, another language (ceylon) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-18 13:31 +0000
                Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-19 00:39 +1100
                Re: Oh look, another language (ceylon) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-18 14:30 +0000
                Re: Oh look, another language (ceylon) Dave Angel <davea@davea.name> - 2013-11-18 15:37 -0500
                Re: Oh look, another language (ceylon) Steven D'Aprano <steve@pearwood.info> - 2013-11-19 02:29 +0000
                Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-19 10:25 +1100
                Re: Oh look, another language (ceylon) Steven D'Aprano <steve@pearwood.info> - 2013-11-19 02:13 +0000
                Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-19 13:54 +1100
                Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-19 13:56 +1100
                Re: Oh look, another language (ceylon) wxjmfauth@gmail.com - 2013-11-19 01:10 -0800
                Re: Oh look, another language (ceylon) Bob Martin <bob.martin@excite.com> - 2013-11-20 08:19 +0000
            Re: Oh look, another language (ceylon) Ian Kelly <ian.g.kelly@gmail.com> - 2013-11-18 05:29 -0700
            Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-18 23:36 +1100
              Re: Oh look, another language (ceylon) Piet van Oostrum <piet@vanoostrum.org> - 2013-11-18 10:31 -0400
                Re: Oh look, another language (ceylon) Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-18 15:06 +0000
        Re: Oh look, another language (ceylon) Rick Johnson <rantingrickjohnson@gmail.com> - 2013-11-18 19:33 -0800
          Re: Oh look, another language (ceylon) Steven D'Aprano <steve@pearwood.info> - 2013-11-19 07:00 +0000
            Re: Oh look, another language (ceylon) Chris Angelico <rosuav@gmail.com> - 2013-11-19 18:18 +1100
            Re: Oh look, another language (ceylon) Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-11-20 18:25 +1300
  Re: Oh look, another language (ceylon) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-18 14:56 +0000

csiph-web