Implies operator (unicode operators)

Anders F Björklund afb at algonet.se
Fri Nov 17 01:58:51 PST 2006


Mariano wrote:

> The notation was just a suggestion. I would prefer =>, but it might be confused with >=. Other options are
> ==>, -->, and since we have UTF-8 support, why not → or ⇒!

We don't have Unicode *operator* "support" in D, they must all be ASCII 
(and they can only have one name each, so you can't have both at once)

It has been suggested before for other operators, and always ignored:
http://www.prowiki.org/wiki4d/wiki.cgi?FeatureRequestList/UnicodeOperators

I don't think it has any technical reasons, just a matter of preference.
(using non-ascii for variables and functions doesn't always work either)


It should probably be in the D FAQ:

Q: Can we have unicode operators ?
A: No, you can't. US-ASCII only.

We need a list of "features rejected"...

--anders

PS.
Yes, I know that the spec says that all Universal Alphas are allowed
for identifiers. Let's just say that it doesn't *always* work, since
the assembler does choke on the names in some implementations of D...
(but I write my own code with ASCII identifiers and English comments)



More information about the Digitalmars-d mailing list