unit-threaded v0.7.45 - now with more fluency
Nick Sabalausky (Abscissa)
SeeWebsiteToContactMe at semitwist.com
Wed May 9 04:40:37 UTC 2018
On 05/08/2018 05:05 AM, Cym13 wrote:
>
> I wouldn't say it's an abuse, the dot means exactly the same thing as
> everywhere else in the language.
No, it really doesn't mean the same thing at all. Not when you look away
from the unimportant implementation details and towards the big picture:
Normally, saying "x.y" denotes composition and membership: It means "y,
which is a member of x". Saying "x.y" does NOT normally denote "The
boundary between word 'x' and word 'y' in an english-grammared phrase".
But with things like "should.not.be", it's very much NOT a
composition/membership relationship: A "be" is not really a
member/property/component/etc of a "not", except in the sense that
that's how the english-like DSL is internally implemented. A "should" is
not really something that is composed of a "not", except in the sense
that that's how the english-like DSL is internally implemented. (IF it
even is implemented that way at all. I didn't look, so for all I know it
might be opDispatch.)
I'm not saying that "should.not.be" OR "~" are abuses, I'm just saying
whether or not they are, they're definitely both in the same category:
Either they're both abuses or neither one is, because they both do the
same thing: utilize use existing syntax for something other than the
syntax's usual semantic meaning.
Formal "operator overloading" isn't the only way to alter (or arguably
abuse) a language's normal semantics.
More information about the Digitalmars-d-announce
mailing list