English binary logic operators

Daniel Keep daniel.keep+lists at gmail.com
Tue Nov 28 07:42:07 PST 2006


Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> David Qualls schrieb am 2006-11-28:
> 
> 
>>Perhaps a few more BRIEF opinions regarding whether the standard
>>English operators should be adopted within the D language would be
>>enough to send the think-tank to their Cave Of Contemplation to
>>debate it amongst themselves. 
> 
> 
> Adding addtional keywords that have exactly the same functions like
> already present keywords (actually keytokens) seems to be against D's
> spirit.
> 
> The more general issue: Iv'e checked 10 random C/C++ projects
> (taken from Gentoo's portage) and none of them used iso646.h's alternative
> spellings.
> 
> Thomas
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iD8DBQFFa+7ZLK5blCcjpWoRAgQdAJ0UBatA3czG0A5+wZdMwcl50q/39gCghILf
> fpEBz2SVezekjI+rWqpibfE=
> =nQ5N
> -----END PGP SIGNATURE-----

Hang on... doesn't that header define macros that look like normal 
prefix functions?  You're comparing this:

 > (expr1 and expr2) or (expr2 and expr3)

with this:

 > or(and(expr1, expr2), and(expr2, expr3))

Given the choice between the existing boolean operators and the second 
lot, I'd choose the existing ones any day.  Given the choice between the 
existing operators and the first lot, I'd chose the first lot.

It's like the referendum regarding Australia becoming a republic: people 
voted against it, and the government toted that out saying "see, the 
public don't WANT to separate from England!"

Fact was, most polls showed that people DID want to become a republic. 
What they had a problem with was the nasty little condition the 
government added: the PM would chose the president, NOT the people. 
What would be the point of even *having* a president if we can't choose 
who it is?  Hence, given the choice between the way things are now, and 
a half-arsed token offering that leaves a bad taste in your mouth, we 
chose the lesser of two evils.

Blech; I'm rambling.  Sorry about that :)

	-- Daniel



More information about the Digitalmars-d-learn mailing list