lua-users home
lua-l archive

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


On Tue, Apr 29, 2014 at 12:07 PM, Paige DePol <lual@serfnet.org> wrote:
> I can see the utility of the `?` at the end of a function name, perhaps even the `!`, though the same can be achieved without the symbols via naming conventions.

It does read nicely, but to be effective _everyone_ must use that
style, and it's hard to enforce conventions at the language level.
And then we've lost the possible use of ? for other things - we've
talked about 'a?b?c' meaning effectively 'a.b and b.c or nil'

> I often will place temporary code, for debugging typically, outdented with the current block so I always remember to remove it. If I somehow forget it is very easy to spot when scanning over the code!

That's cool - you're using whitespace for your own semantic purposes.
Not a freedom one has with strict indentation-driven languages.
Although there are cool tricks possible there as well - for instance,
in Nimrod 'when' is a compile time condition (it really means
something like #if in C) and people will comment code in and out using
'when true'  or 'when false'. A person could choose 'when 1==1' to
mark temporary blocks (they do not open new variable scopes)