[Haskell-cafe] Binary constants in Haskell

Ketil Malde ketil+haskell at ii.uib.no
Thu Oct 25 10:30:53 EDT 2007


Dusan Kolar <kolar at fit.vutbr.cz> writes:

>  // PLS, no flame

I apologize if my post came across as such, that was certainly not the
intent. 

> I think the question was [..] whether there's such a literal or not
> and whether it is bad idea to have something like 0b10111011.

I agree.

>  From my point of view, the difference between 0b10111011 and
> (bin[1,0,1,1,1,0,1,1]) is 22-10 that is 12 characters.

And from my point of view, 0xEE or 0x273 are equally readable, and
even more succinct.  If you are into bit-twiddling, that is.  For
user-friendly bitfields you should obviously provide a higher level
interface.

>  So, i would expect only two answers: NO, it is .......,  or YES, in
> version 6.9.0 it is possible. ;-)

As far as I know, there are no such plans.  Send in a patch and see if
it gets accepted :-)

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list