Extended Type Design.

Deewiant deewiant.doesnotlike.spam at gmail.com
Fri Mar 16 10:23:07 PDT 2007


Benji Smith wrote:
> And the word "super" is now overloaded in two completely unrelated concepts.
> 

Which isn't that rare, see the following link:
http://www.prowiki.org/wiki4d/wiki.cgi?LanguageSpecification/KeywordIndex

I find the following examples: auto, in, is, mixin, scope, static.

I have come to abhor the keyword "static" largely due to the above. Too bad its
various uses are unavoidably useful. <g>

But I do agree with you, in a way. After writing the following I find my
explanation somewhat unclear even to myself, but bear with me.

The problem with "super const" is that "super" modifies the other keyword,
"const", instead of saying something about the expression/statement/whatever (in
this case, the type). Even "static", in all its horror, can be seen as
specifying one of "module-level" or "compile-time". The other keywords mentioned
above use their English meaning as such an explanation, and so can be understood
without too much thought. "super const" would make "super" another "static":
lacking context, you can't be sure about about even the general meaning, let
alone the one in a specific instance.

Upon reflection it may be moot, since one probably rarely cares about keywords'
meanings without context, but I'm sure some psychologist could come up with
something about intuitiveness which affects coding speed, or whatever.

I'd be happiest to just get the feature as soon as possible; worrying about
keyword semantics can come later. Just like the abominations beginning with
"on_scope_". <g>

-- 
Remove ".doesnotlike.spam" from the mail address.



More information about the Digitalmars-d mailing list