[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Scripting language takes a silicon turn
- From: Ben Sunshine-Hill <sneftel@...>
- Date: Thu, 26 Jan 2006 00:35:18 -0800
On 1/26/06, Alen Ladavac <alenl-ml@croteam.com> wrote:
> From: "Ben Sunshine-Hill" <sneftel@gmail.com>
> >There isn't necessarily any context, because blocks aren't always
> >Introduced by if, while, etc. Take the code { a = 1 }. Table
> >constructor or block?
>
> If the statement terminator was mandatory, then it would clearly be a block
> because it's at the start of the statement. But really, I was not asking
> about freestanding blocks, but about if <condition> then <statements> end
> being sugared as if <condition> { statements } (same for while, for,
> function, etc). I believe this does have quite a context right?
It's still ambiguous. "if(a) { b = 1 }" is likewise either a
brace-delineated if statement, or a table constructor in an
unterminated if statement. So you'd have to do away with the standard
method of marking blocks altogether for such statements. Which means
you'd have one syntax for if-blocks, and another for freestanding
blocks. Blech.
- References:
- Scripting language takes a silicon turn, Vijay Aswadhati
- Re: Scripting language takes a silicon turn, Ben Sunshine-Hill
- Re: Scripting language takes a silicon turn, Walter Cruz
- Re: Scripting language takes a silicon turn, LEGO
- Re: Scripting language takes a silicon turn, Chris Marrin
- Re: Scripting language takes a silicon turn, Alen Ladavac
- Re: Scripting language takes a silicon turn, Chris Marrin
- Re: Scripting language takes a silicon turn, mnewberry
- Re: Scripting language takes a silicon turn, Ben Sunshine-Hill
- Re: Scripting language takes a silicon turn, Alen Ladavac