DMD 1.019 and 2.003 releases

0ffh spam at frankhirsch.net
Mon Jul 23 23:39:49 PDT 2007


Derek Parnell wrote:
> I use ...
> 
>  char c;
>  int v = (cast(int)c - '0')
> 
> To me it the same as assuming that boolean values are integers.

You suggest writing things like

   for (int c=0x100;c!=0;--c) {...}

or

   for (int c=0x100;cast(bool)c;--c) {...}

?

UGH! :-)

Maybe another example what systems programming language might mean:
A language that encourages the programmer to know what is going on
behind the scenes, after compilation, and allows her to make use of
that knowledge.
If I know that testing a condition is nothing but comparing a number
to zero, writing "if (number!=0)" just becomes redundant.

Regards, Frank



More information about the Digitalmars-d-announce mailing list