removal of cruft from D

Leandro Lucarella llucax at gmail.com
Fri Nov 20 17:30:29 PST 2009


Bill Baxter, el 20 de noviembre a las 15:43 me escribiste:
> > octal(755)?
> >
> > What's the base-10 identity of that?
> >
> > decimal(493) or decimal(755)?
> >
> > base-16 etc.
> 
> Fine.  Make it octal!"755" if you prefer.
> The point is just that you can write a function that will convert a
> number to octal for the rare cases when you need it.
> You don't absolutely need octal literals.

Please, understand this: IS NOT RARE IF YOU DO POSIX SYSTEM PROGRAMMING.

If you remove octals because they can be implemented in the library,
remove hexa and binary literals as well. And please, stop using the
argument of octal literal being rare, they aren't when programming using
POSIX. You use the all over it when managing filesystem related stuff.

I do think octal literals should be 0oNNN (or 0cNNN, I prefer 0oNNN
because it's already used by Python, so I would be very error prone to me
when switching the language to remember which to use).

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
He used to do surgery
On girls in the eighties
But gravity always wins



More information about the Digitalmars-d mailing list