lua-users home
lua-l archive

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


I guess I don't see the problem with {} between the reserved keywords if, 
else, and end becuase it would seem that the parser would always have a 
context to work with. The use of "then" doesn't really bother me anyway.

But I really would like to have != and // as syntactic sugar for ~= and --

Michael

On Wed, 25 Jan 2006 16:25:32 -0800, Chris Marrin wrote
> Alen Ladavac wrote:
> > From: "Chris Marrin" <chris@marrin.com>
> > 
> >>- the required 'then' keyword
> > 
> > 
> > Yes indeed. That's a pain too. Did anyone ever succeed replacing then-end
> > and do-end constructs to use curly braced blocks like C, i.e. "{" 
and "}" ?
> 
> Adding support for braces in place of the current block structuring 
> would be difficult because of the clash with the use of brace for 
> defining a table. Javascript, for instance, has a nasty ambiguity 
> because of this.
> 
> And personally I find the Lua block syntax to be tolerable.
> 
> -- 
> chris marrin                ,""$,
> chris@marrin.com          b`    $                             ,,.
>                          mP     b'                            , 1$'
>          ,.`           ,b`    ,`                              :$$'
>       ,|`             mP    ,`                                       
> ,mm    ,b"              b"   ,`            ,mm      m$$    ,m        
>  ,`P$$   m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P     
>   ,`  :$1  b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$  
>    .`    :$| b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    
> :$$,..;"'     |$: P$b,      _;b$$b$1"       |$$ ,`      ,$$"         
>     ``'          $$  ```"```'"    `"`         `""`        ""`        
>                   ,P` "As a general rule,don't solve puzzles that 
> open portals to Hell"'