not operator operator..

Deewiant deewiant.doesnotlike.spam at gmail.com
Wed Apr 5 11:00:19 PDT 2006


Lars Ivar Igesund wrote:
> Deewiant wrote:
> 
>> Chris Miller wrote:
>>> On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb at algonet.se>
>>> wrote:
>>>
>>>> An old feature request was that D should allow Unicode operators,
>>>> as an *alternative* to the ASCII operators. But it didn't catch on ?
>>>>
>>>>
> http://www.prowiki.org/wiki4d/wiki.cgi?FeatureRequestList/UnicodeOperators
>>>> (Somehow these things are always treated as replacements, not add-ons)
>>>>
>>> Not everyone supports unicode very well. What happens when I try looking
>>> at your source code and I see funny boxes or question marks.. it'd be
>>> fine in string literals, but if it's part of the program flow, I'd be
>>> lost.
>> Isn't that point defeated by the fact that we have Unicode identifiers?
> 
> Not really, as you currently know that identifiers can be Unicode, but not
> the operators. I agree that Unicode identifiers can be difficult to read if
> some of the characters are missing in the font, but at least you'd still
> know which operations were performed on them.

The problem is that, even now, in the worst case you can get something that
looks like this:

??? += ???;
for (?? = ???; ??? < ?; ?.???()) {
	???.?.???(??, ???);
	if (??.?())
		writefln(??? * (?-??));
}

While this is, of course, quite unlikely, I doubt that changing the operators in
the above to "?" decreases readability very much. <g>



More information about the Digitalmars-d mailing list