[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ruby philosophy vs Lua philosophy
- From: Marc Balmer <marc@...>
- Date: Sun, 24 Feb 2013 21:35:52 +0100
Am 24.02.2013 um 21:25 schrieb William Sumner <prestonsumner@me.com>:
> On Feb 24, 2013, at 10:59 AM, Ico <lua@zevv.nl> 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 :)
>
> That sounds like it was meant to be Ruby-bashing. :) The %i literal syntax falls in line with the existing %w syntax for creating an array of strings. Lua has its own syntactic sugars, so what constitutes small and tidy can be pretty subjective, really. Every language has its reasons for being the way it is.
Here is my opinion:
Lua is pragmatic.
Ruby is dogmatic.
Perl is problematic (to be nice).
PHP should go to the attic.
Cum grano salis, as usual ;)