de facto keywords

Paul D. Anderson paul.d.anderson.removethis at comcast.andthis.net
Sat Apr 5 07:22:43 PDT 2008


It seems to me there exist a few "unofficial" keywords in D that should be promoted to reserved words:

"string", "dstring", "wstring" -- I'm assuming that backward compatibility is the only reason these are not declared as keywords. Is there more to it than that?

"tuple" -- The use of tuples is ubiquitous in D. There is a a "tupleof" property for structs and unions. The "foreach" keyword knows about them. Yet there is no syntactic support for the thing itself. It is confusing to be required to define a template to access something the compiler creates. This may be just syntactic sugar but it's necessary sugar, IMHO.

Paul



More information about the Digitalmars-d mailing list