lua-users home
lua-l archive

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

Peter Prade wrote:
> > Currently, the only allowed forms are:
> >     f (blah)
> >     f {blah}
> >     f "blah"
> > although it could easily be extended to take the other atomic constants
> >     f 123
> >     f nil
> >     f true
> >     f false
> > without any problem.
> well maybe without technical problems.
> but imho the latter forms are much less readable, so they would create
> problems in reading lua code.
> (i think already the syntax f"" instead of f("") is worse to read, so i
> don't tell my users about it ;-)
> Cheers,
> Peter Prade

I think it would be very nice to be able to say f 123 
or f true or f false. It can make scripting very easy for 
non-programmers. You could then do things like, say:

NewCharacter "elly" 
Name "Lesant"
FirstName "Elly"
Age 21
LikesCookies true
Done "elly"

Wich looks probably lot easier to non-programmers.

But, I realise that in lua 5, you can archieve 
practically the same by swapping the global table,
although = signs would be required then.

"No one knows true heroes, for they speak not of their greatness." -- 
Daniel Remar.
Björn De Meyer