[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: default values of 'false' in data description
- From: roberto@... (Roberto Ierusalimschy)
- Date: Thu, 14 Sep 2006 17:20:03 -0300
> could anybody elaborate on the downsides of everyting (or most things)
> being an expression?
"Most things" is quite different from "everything". If you count, probably
most things are already expressions in Lua ;)
(+, -, *, /, .., and, or, not, function calls, constructors, etc.)
I will try to answer the "everything" part.
- When all statements become expressions, usually all expressions become
statements too. (Not necessarily a downside, but it is good to keep this
in mind.)
- Possibility of much more cryptic programs.
- Probably lots of syntactical conflicts in Lua (mainly because of
non-mandatory semi-colons).
- Several statements have no natural meaning as expressions. Among them,
return, break, while, and repeat. Actually, I guess that only "if" and
assignment (with all complexities of multiple assignment) have a natural
meaning.
-- Roberto