On Wednesday, 14 November 2012 at 00:54:07 UTC, Walter Bright
wrote:
On 11/13/2012 12:56 PM, Walter Bright wrote:
An insightful talk by Guy Steele on what makes a language
successful.
http://www.youtube.com/watch?v=_ahvzDzKdB0
Guy says something interesting in there that's applicable to
one of our current discussions.
Particularly, should we allow:
@identifier
as a user-defined attribute, in potential conflict with future
reserved attribute words, or not?
Guy makes the argument that users need to be able to extend the
vocabulary of a language and have those new words look like
built-in ones. We have that today, of course, with the ability
of defining new types. There is no special syntax that says
"this is a user-defined type, not a keyword."
I think this is a compelling argument, and tips the scales in
its favor. Probably we've been excessively worried about the
problems of adding a new builtin attribute type.
I think an example to watch is how Java has been evolving.
Since attributes were added to the language, new features tend to
be introduced via new attributes (e.g. @Overload, @NotNull, ...)
to avoid collisions with existing code.
While it makes sense from the backwards compatibility point of
view, and Python3 is a good example people don't like rewriting
legacy code, it leads to attribute definition explosion.
--
Paulo