lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Sun, 24 Feb 2013 18:59:13 +0100
Ico <> wrote:

> By no means ment as Ruby-bashing, but an (imho) interesting
> observation: one of the new core features of Ruby 2.0 is the
> following syntactic sugar for generating lists of symbols:
>   # Ruby 1.9:
>   KEYS = [:foo, :bar, :baz]
>   # Ruby 2.0:
>   KEYS = %i[foo bar baz]
> Funny, but I can't imagine this type of 'new language features' ever
> ending up in Lua. Thank you for keeping my favourite language small
> and tidy :)

Quoted for Truth!!!

I wouldn't call that syntactic sugar so much as syntactic molassas.

I learned Ruby first, but I never understood iterators until learning
Lua, because Ruby's iterator syntax is so magical, black boxy, and
removed from its function.