April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Anders F Björklund | On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb@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.
|
April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Miller | Chris Miller wrote:
> On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb@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?
|
April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Deewiant | Deewiant wrote: > Chris Miller wrote: >> On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb@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. |
April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lars Ivar Igesund | Lars Ivar Igesund wrote:
> Deewiant wrote:
>
>> Chris Miller wrote:
>>> On Wed, 05 Apr 2006 04:08:08 -0400, Anders F Björklund <afb@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>
|
April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Deewiant | "Deewiant" <deewiant.doesnotlike.spam@gmail.com> wrote in message news:e110jq$31dh$1@digitaldaemon.com... > ??? += ???; > for (?? = ???; ??? < ?; ?.???()) { > ???.?.???(??, ???); > if (??.?()) > writefln(??? * (?-??)); > } Don't forget: ? = ???? ? ??? : 0; The ternary ?: would be impossible to spot ;) |
April 05, 2006 Re: not operator operator.. | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Miller | Chris Miller 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 ?
>
> 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.
I thought D only supported Unicode platforms ?
(it only does for input/output, for instance)
Anyway, where there is use there is abuse I guess...
Maybe it's good that there's no Unicode operators.
I for one (usually) keep my code ASCII and English.
--anders
|
Copyright © 1999-2021 by the D Language Foundation