DMD 0.148 release

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Sun Feb 26 16:05:49 PST 2006


Georg Wrede wrote:
> This is getting hilarious...

Really? I'm glad that this entertains you?

> 
> 
> Ivan Senji wrote:
> 
>> Georg Wrede wrote:
>>
>>> Well, then we could skip the logical operators, right? No more && or 
>>> ||. Since all booleans would be strictly 0 or 1, they'd become obsolete.
>>
>>
>> What? Did you here this correctly? You are saying remove logical 
>> operators (the operators working on booleans in theory)?
>>
>> How would they become obsolete? They would get a meaning with true 
>> booleans.
> 
> 
> If Booleans are only 0 or 1, then & and | suffice. && and || become 
> useless, and we can delete them from the compiler sources.

That is one part I didn't understand. Why would booleans have to be 0 or 
1? (or are you kidding, I'm too tired to be sure).

& is totally different from &&, & compares bits one by one, and && is 
equivalent to * in Boolean algebra, two different concepts mustn't be 
combined like that.

> 
> Not to mention the lots of ink we could save!

That's true.

> 
>> I must say that i don't have a clue what is the result of 17 && 301?
> 
> 
> I have no problem believing that's true.
> 
>>> And if booleans have to only be 0 or 1, then a whole lot of 
>>> unnecessary conversions would be happening all over the place. Forget 
>>> D speed.
>>
>>
>> No they don't. They can be anything they wan't to be. But the compiler 
>> should hide that from me and convince me I live in a world of Boolean 
>> algebra.
> 
> 
> Since I've just promised not to recommend a certain language from 
> Redmond, maybe I could recommend some substance?

Sure, maybe C#? C# got bools right too.

> 
>>> We've all had our fights with C, C++, and other related languages. 
>>> But honestly, how many of us can confess to having problems with 
>>> logical values?
>>
>>
>> I have problems with bools. I can't sleep at night if they are ints ;)
> 
> 
> Oh. Maybe then a prescription substance?

No thanks :)



More information about the Digitalmars-d-announce mailing list