[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request for clarification on reserved names
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 29 Apr 2014 09:19:13 +0200
On Tue, Apr 29, 2014 at 3:51 AM, Paige DePol <lual@serfnet.org> wrote:
> I do not believe I have ever used a language in which the keywords were also usable for variable names, and after reading that mess above, I don't believe I would ever want to.
Yep, there's a good reason for keeping keywords and identifiers in
different namespaces - and also for keeping punctuation in 'symbol
space' (which is why I don't care for 'dir?')
> I would put reuse of keywords right up there with significant whitespace as far as "bad" language features go!
Oh, significant indentation is easy enough to get used to, especially
with editor support - one learns to become very indentation-aware.
van Rossum's point is that one should indent anyway, why not make it
meaningful? It isn't everyone's cup of tea, and I like Lua's syntax
choices, but it's one of the proven ways to indicate block structure
in PLs.
What (however) is hard to read is when other kinds of whitespace
become meaningful, e.g. in Moonscript 'f(x) + 1' and 'f (x) + 1' mean
different things, because the call operator precedence is so low.
f"heh" is a special case (like with Lua) but add a space, and
interesting things can happen! This was done (I believe) so that lpeg
could still be written in an uncluttered way.
- References:
- Request for clarification on reserved names, Hisham
- RE: Request for clarification on reserved names, Thijs Schreijer
- Re: Request for clarification on reserved names, Hisham
- Re: Request for clarification on reserved names, Dirk Laurie
- Re: Request for clarification on reserved names, Coroutines
- Re: Request for clarification on reserved names, Dirk Laurie
- Re: Request for clarification on reserved names, steve donovan
- Re: Request for clarification on reserved names, Coroutines
- Re: Request for clarification on reserved names, Sean Conner
- Re: Request for clarification on reserved names, Robert Virding
- Re: Request for clarification on reserved names, Roberto Waltman
- Re: Request for clarification on reserved names, Paige DePol