lua-users home
lua-l archive

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

On Sunday 01 June 2003 13.06, Deneb aka Alpha Cygnus wrote:
[...Pascal style "with"...]
> Well, any way, its just a suggestion, nothing more. Since Lua
> already has pascal-like syntax, why not take one more construct
> from there? ;-)

Either way, it won't hurt me if I don't use it, so I don't really mind 
all that much. ;-)

> Slightly off-topic: for me the main difference
> between Pascal and Lua syntax is = and ==, thanks god (and the
> authors of Lua) that assignment does NOT return a value and using =
> in "if" causes a syntax error :)

Yeah, that's very nice.

As to C, I've switched to always writing "if(<value> == <variable>) 
..." when possible, so the code won't compile at all if I accidentaly 
type '=' instead of '=='. Unfortunately, that doesn't work for 
variables... *heh*

Then again, "-Wall -Werror" (GCC) does trap any use of '=' in a 
condition, unless it's marked as "I really mean this!" by extra 
parentheses. I use it all the time.

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> -'
   --- --- ---