D benchmark code review
Chris Cain
clcain at uncg.edu
Sat Dec 14 11:32:44 PST 2013
On Saturday, 14 December 2013 at 16:22:41 UTC, Ola Fosheim
Grøstad wrote:
> Regarding using the not-operator for non-not-operations:
> anything would be better than reusing operators that are
> commonly used to affect control-flow. It makes it difficult to
> comprehend control flow when you skim code you are not familiar
> with. "not" tends to be used for completely changing the flow
> of a program so those "!" are attention-seekers when trying
> comprehend unfamiliar code.
But still, _what exactly_ should be used instead of the
"not-operator"? "Anything" is too vague and not true. You
probably can't use these: ][+=-_,.|`\/"'><;:}{%^&*
("Can't" is a strong word. <>s are used by C++, for instance, but
we already know of the challenges and issues caused by that)
You might could _just_ use ()s but it'd lead to some parsing
difficulties for both the programmer and the computer.
I'm just curious, not trying to say you're wrong. I do think it's
a huge step up from C++'s templates and, personally, I love the
new syntax with an infix ! for instantiating templates. But if
something better could be used, I'm interested in hearing the
ideas too.
More information about the Digitalmars-d
mailing list