[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lightweight syntax: a dissident view
- From: Matthew Wild <mwild1@...>
- Date: Wed, 24 Nov 2010 16:43:09 +0000
On 24 November 2010 16:33, Enrico Tassi <gareuselesinge@libero.it> wrote:
> On Wed, Nov 24, 2010 at 11:44:14AM +0200, Dirk Laurie wrote:
>> What I like about Lua is just the same thing I like about Pascal:
>> it is immediately readable, especially when syntax highlighted in
>> a good editor, and you can code in Lua quite rapidly because while
>> typing long words like 'function' and statements requiring two keywords
>> like 'if'...'then', your brain is racing ahead.
>>
>> What puts me off from the current spate of lightweight syntax
>> proposals is just the same thing I hate about C and Perl: they
>> are cryptic and the saving in keystrokes now is not worth the
>> brain pain later.
>
> I'd like to add another observation. I'm used to functional languages,
> where anonymous functions are pervasives, and I like them, but Lua has
> not a "functional" syntax, i.e. expressions and statements are not the
> same.
>
> More to the point, the benefit of being able to omit "return" and
> possibly use a shorter token like "\" or "lambda" to introduce the
> anonymous function is limited, in my opinion, by the fact that you can't
> return a stement, only an expression.
>
Observations such as this are why I'd rather direct the efforts spent
vigorously discussing various syntaxes over the past few days into
macros or a generic syntax extension mechanism such as token
filtering.
With simple token filtering hooks in Lua it would be possible for a
whole new set of Lua libraries to provide extensions such as these,
specific to the particular domains it's being used in. And an end to
these circular syntax debates, and whether to have bitwise function
names in uppercase :)
Regards,
Matthew