not operator operator..
Anders F Björklund
afb at algonet.se
Wed Apr 5 01:08:08 PDT 2006
Georg Wrede wrote:
>>>>> Sure there is. ≡ in Unicode (\u2261), or === in plain ASCII.
>>>>> It's just that it was removed from the language in DMD 0.126 ?
>>>>
>>>> If D really _demands_ source code to be in UTF, then there is no
>>>> excuse for avoiding single-character operators like "≡".
>>>
>>> Except that they're not easily acessable on a common/standard
>>> keyboard, right?
>>
>> What? You mean you're *not* using the standard 473-key keyboard? How
>> strange !?
>
> If somebody is able to produce "≡", then let him define it. All we need
> is some suitable syntax.
>
> define ≡ opMyEqual; // or something like this
>
> I admit, this idea is not yet implementable as such: some operators may
> not be strictly binary, and other such issues. And I'm definitely not
> talking D 1.0 here. But still.
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)
> Such a character would of course only be used in that particular
> application, and thus probably be developed by a group of people who can
> tell each other how to produce this character. Or they can copy/paste it
> (just as I did, without even bothering to search for ways of actually
> typing it).
I just selected it from the Unicode input helper:
http://www.algonet.se/~afb/d/unicode-palette.png
> I'm not really pursuing this issue as something First Priority, or
> Essential. It's more like, if we don't accept this, then what's the use
> of accepting any at all non-USASCII source code (outside of string
> literals)?
I believe that D in practice is an ASCII language. That's OK with me.
--anders
More information about the Digitalmars-d
mailing list