Thoughts on improving operators

kennytm kennytm at gmail.com
Wed Oct 5 14:37:11 PDT 2011


Gor Gyolchanyan <gor.f.gyolchanyan at gmail.com> wrote:
> The whole point was to put the question mark to a better use.
> I mean, it's used in the ternary operator exclusively.
> It's such a waste of a token.
> The question mark logically belongs to bools (which goes good with the
> ternary operator), but the bools are much more ofter worked with in
> the form of predicates, so I'd want to make that question mark more
> useful.

That could be said to '-' which is only used for subtaction. What a waste
of token. 

I'd say as long as the symbol alone is a valid token, it should never be
part of an identifier, doing else just gonna confuse anybody coming from
C-like languages, i.e. C, C++, C#, D, Java, JavaScript, etc.   

-1.

You've got a slightly better chance if you've suggested '#'.


More information about the Digitalmars-d mailing list