accept @pure @nothrow @return attributes
Jonathan Marler via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jan 28 11:07:58 PST 2015
On Wednesday, 28 January 2015 at 18:54:29 UTC, Zach the Mystic
wrote:
> I think a keyword is a keyword is a keyword. If it's a keyword
> to the right it should be one everywhere. How is somethign
> that's a built-in attribute one place and an identifier in
> another not context sensitive. Walter said that `exit`, `C++`,
> i.e. `scope(exit)`, `extern (C++)` etc. were never keywords,
> but I disagree. They are indeed context sensitive keywords.
> They have wisely been kept to a minimum. They are just
> confusing to reason about, except in the most strictly confined
> places, where they are now. I think that's why they're out of
> the question. They have wisely been kept to a minimum.
This is actually a valid argument against my proposal. Thank
you! lol. I don't agree with it but at least it's valid :) Your
reasoning depends on how you define a keyword. You seem to be
defining a keyword in terms of an identifier that is recognized
by the compiler to have a special meaning. I define a keyword as
a word that the lexer recognizes as a keyword token.
I see what you mean by saying that the word is a function
attribute in one place and an identifier in another. But what's
wrong with that? if I define a struct named mystruct...I could
declare one like this:
mystruct mystruct;
The first appearance is a type and the second is an identifier.
I'm sure there are many examples of this in the language.
Anyway, I disagree with your conclusion, however, I agree that
this could be a concern.
More information about the Digitalmars-d
mailing list