[ghc-steering-committee] Underscores in literals

Simon Peyton Jones simonpj at microsoft.com
Tue Nov 7 18:56:27 UTC 2017


I’m ok with this, although I have not thought deeply about the details.

Simon

From: ghc-steering-committee [mailto:ghc-steering-committee-bounces at haskell.org] On Behalf Of Iavor Diatchki
Sent: 07 November 2017 18:12
To: ghc-steering-committee at haskell.org
Subject: [ghc-steering-committee] Underscores in literals

Hello,

This e-mail is about pull request #76, to allow underscores in numeric literals:

https://github.com/takenobu-hs/ghc-proposals/blob/numeric-underscores/proposals/0000-numeric-underscores.rst<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftakenobu-hs%2Fghc-proposals%2Fblob%2Fnumeric-underscores%2Fproposals%2F0000-numeric-underscores.rst&data=02%7C01%7Csimonpj%40microsoft.com%7C43f4d68308cc457345c608d5260b15d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636456751412020624&sdata=NJviNm0jzZTC5BXIPylzb2WsWtJRJk%2B2upa8ImD%2F6y0%3D&reserved=0>

In short, this is a very simply feature, which modifies the notation for numeric literals to allow writing underscores (_) in the middle of literals.   The underscores are only to increase readability, and have no effect on the meaning of the program.  So, for example, I could write things like: 10_000_072 or 0xFFFF_FA10.

Many other languages have a similar feature (especially hardware specification languages) and I see no downsides to it, so I think we should accept it.

Please respond to this e-mail if you have objections.

Cheers,
-Iavor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20171107/61d63f22/attachment.html>


More information about the ghc-steering-committee mailing list