Matz commented on this once; I won't speak for him,
but my impression was that this was done rather in
the interest of avoiding unnecessary rigidity.

That's how I would view it, anyway. And I do like this
(arguable) feature, as I 've said.

As for syntax highlighters... well, I don't think these need
to be made that "smart." It doesn't actually hurt anything
if a word is colored incorrectly... in fact, for those who want
this coding style discouraged, an incorrectly-marked word
would do so -- alerting the coder that he had (perhaps
inadvertently) used a keyword as a method name or whatever.

Hal

----- Original Message -----
From: Conrad Schneiker <schneik / austin.ibm.com>
To: ruby-talk ML <ruby-talk / netlab.co.jp>
Sent: Tuesday, August 08, 2000 12:20 PM
Subject: [ruby-talk:04357] Re: Thirty-seven Reasons [Hal Fulton]Love[s] Ruby


> 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.)
>