digit groups (Was: three syntax-sugar proposals)

Henning Thielemann haskell at henning-thielemann.de
Mon Oct 23 12:02:06 EDT 2006


Bulat Ziganshin bulat.ziganshin at gmail.com, Sat Oct 14 11:19:32 EDT 2006 
on three syntax-sugar proposals

> 1. allow to use '_' in number literals. its used in Ruby and i found
> that this makes long number literals much more readable. for example
>
> maxint = 2_147_483_648

Sounds like something that can be solved with an infix operator:

(~~) :: Integer -> Integer -> Integer
a ~~ b  =  a*1000 + b

2~~147~~483~~648


More information about the Haskell-prime mailing list