Oh look, another language (ceylon)

Rick Johnson rantingrickjohnson at gmail.com
Mon Nov 18 01:18:34 CET 2013


On Saturday, November 16, 2013 9:41:07 PM UTC-6, Gregory Ewing wrote:
> The type system looks very interesting!

Indeed.

I went to the site assuming this would be another language
that i would never like, however, after a few minutes
reading the tour, i could not stop!

I read through the entire tour with excitement, all the while
actually yelling; "yes" and sometimes even "yes, yes, YES"

But not only is the language interesting, the web site
itself is phenomenal! This is a fine example of twenty first
century design at work.

I've always found the Python web site to be a cluttered
mess, but ceylon-lang.org is just the opposite! A clean and
simplistic web site with integrated console fiddling --
heck, they even took the time to place a button near every
example!

Some of the aspects of ceylons syntax i find interesting are:

    Instead of using single, double, and triple quotes to
    basically represent the same literals ceylon decided to
    implement each uniquely. Also, back-tick interpolation
    and Unicode embedding is much more elegant!
    
    The use of a post-fix question mark to denote a
    declared Type that can optionally be null.

    The ceylon designers ACTUALLY understand what the
    word "variable" means!

    Immutable attributes, yes, yes, YES!

    The multiplication operator can ONLY be used on
    numerics. Goodbye subtle bug!

    Explicit "return" required in methods/functions!

    No "default initialization to null"

    No omitting braces in control structures
    (Consistency is the key!!!)

    The assert statement is much more useful than
    Python's

    The "tagging" of iterable types using regexp
    inspired syntax "*" and "+" is and interesting idea

    Conditional logic is both concise and explicit using
    "exists" and "nonempty" over the implicit "if value:"

    Range objects are vastly superior to Python's lowly
    range() func.

    Comprehensions are ordered more logically than
    Python IMO, since i want to know where i'm looking
    BEFORE i find out what will be the return value


        Ceylon: [for (p in people) p.name]
        Python:[p.name for p in people]
        Ruby: people.collect{|p| p.name}

        Ceylon: for (i in 0..100) if (i%3==0) i
        Python: [i for i in range(100) if i%3==0]
        Ruby: (1..10).select{|x| x%3==0}

        Funny thing is, out of all three languages,
        Ruby's syntax is linear and therefor
        easiest to read. Ruby is the language i
        WANT to love but i can't :( due to too many
        inconsistencies. But this example shines!

> It's just a pity they based the syntax on C rather
> than something more enlightened. (Why do people
> keep doing that when they design languages?)

What do you have in mind?

Please elaborate because we could use a good intelligent
conversation, instead of rampant troll posts.




More information about the Python-list mailing list