Hi,

David Douthitt wrote:
> 
> REASON 21
> 21.  Reserved words aren't. It's perfectly allowable to use an
> identifier that is a so-called "reserved word" as long as the parser
> doesn't perceive an amibiguity. This is a breath of fresh air.
> 
> It is?  I don't think anyone should use reserved words as normal variables.  A compiler or interpreter writer should almost disallow reserved words as a matter of principle - though in extreme conditions, it might be useful to use them.

Well, it's certainly nice for search purposes, general user
friendliness, and so on that variable names not be keywords.

The big gotcha is: "... as long as the parser doesn't perceive an
ambiguity.". This gives the usability of this feature a somewhat
counter-intuitive Perl-like dependency on context. If you had a (say
"AI") program that dynamically generated Ruby code that turned incoming
text words (say with _a_ being substituted for apostrophes and so on)
into variable names, your code would likely be sooner or later tripped
up by this feature.

Does use of this feature trip up vim and emacs syntax highlighters?

Perhaps use of this feature is something that -w mode should always
complain about.

But first, I would like to know why this feature was implemented the way
it was. Were there any strong reasons for it, was it something that
seemed interesting to do at the time, or what?

-- 
Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)