DMD 0.148 release

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Tue Feb 28 02:39:38 PST 2006


Charles Hixson wrote:
> Ivan Senji wrote:
> 
> 
>>...
>>One more thing. I heared from a Ruby user that in Ruby 0 means true.
>>To that user while(1) is pefectly obvious it is a block of code executed
>>exactly once. No problems in understanding that for a Ruby user.
>>...
> 
> 
> Yes.  IIRC in Ruby everything except Null and False is handled as if it were
> true.  There's some justification that I can't remember...probably "That's
> the way Perl does it", but that's just a guess.
> 
> OTOH, Ruby doesn't even TRY to be type safe.  I like Ruby a lot, but that's
> not the way I think things should be handled.  And I'm all in favor of
> Boolean being a type of size 1 that, if it implements + and *, implements
> them as "or" and "and"...and NEVER automatically converts to or from any
> arithmetic form.  

Another Bool believer ;)

> That seems to me to be much more reasonable.  (Yes, C
> didn't do it that way.  C didn't even HAVE a boolean type.  [Well, the
> first C compilers I used didn't...bool was implemented via a macro
> substitution for int.]  So I don't find that a very powerful argument for
> what D should do.)

I agree.

> 
> Still, no language is perfect, and as warts go, this is a small one.
> 

No language is perfect, but I don't think it is souch a small problem in 
a language claiming to be a modern language.



More information about the Digitalmars-d-announce mailing list