Hi All!
There have been many points made in this thread. Some were actually
related :)
Peter's remarks are central to the problem. Forbidding the use of the
correct name for a class or feature makes Eiffel less valuable than it
could be. Long-time Eiffelistas enjoy claiming that the flow between
real-world problem space and implementation is seamless and reversible
(sound familiar?).
I can understand resistence to change, but the issue is very real and
needs to be addressed in a way that is more responsible than "Get over
it" or "Just us a different name".
I had made a couple of suggestions earlier and a counter claim used them
incorrectly. What I am proposing is an escape mechanism. That is a
well understood mechanism. I don't care if it's a compiler hack or a
change to the language - as long as it addresses the actual problem.
When I suggested using a prefix as a syntactic element, I did not say,
imply, nor intend the prefix to become part of the identifier. That
would miss the point, wouldn't it?
If an escape mechanism were used, it would be not be needed everywhere -
it's simply (let me make this even more clear) Not Part of the
Identifier. Eiffel keywords have their meaning but they also separate
other tokens. The escape mechanism would introduce another token.
A counter claim used a construct like this to show how ugly or stupid (I
forget which) an escape character would be:
a := b.?class
to me, this is unnecessary because the context should allow
a := b.attribute
Other places might include
attribute := b.c
OK, that looks like trouble, so the identifier needs escaping. I don't
know if all keywords would be escapable without heroic mods to the
language, but I would hope that at least new ones (which, by the way
really _are_ language changes) would.
The smart guys (and you know who you are) need at least to consider
this, not with the predisposition to prove it's a dumb idea, but with
the intent to address the very real problem, as Peter as made quite
clear.
R
==================================================
Roger F. Osmond
----------------------------------------
Amalasoft Corporation
273 Harwood Avenue
Littleton, MA 01460
> -------- Original Message --------
> Subject: Re: [eiffel_software] Re: Using keywords as identifiers
> From: Berend de Boer <
[hidden email]>
> Date: Thu, May 14, 2009 7:37 am
> To:
[hidden email]
> >>>>> "Ted" == Ted <
[hidden email]> writes:
> Ted> Despite of introducing a mechanism in the language or not, I
> Ted> agree with Paul using the suffix "_". Because no matter how,
> Ted> we need something that must be different with the
> Ted> keyword. This is the simplest and most readable form. Better
> Ted> than `class', @class ... Why not using prefix "_"? A
> Ted> symbolic prefix does not follow rule of Eiffel identifier
> Ted> definition. This also applies to the forms of `class',
> Ted> @class...
> See Peter Gummer's comments. This _ ends up everywhere, in
> documentation etc. Also code generation tools need to know what
> identifiers are key words. An escaping mechanism is the answer to
> both.
> --
> Cheers,
> Berend de Boer