https://github.com/ghc-proposals/ghc-proposals/pull/76#issuecomment-33995299... This appears to have near universal approval. It's certainly a feature I've been grateful for when writing Rust code. I wasn't able to find a thread about this proposal in my email archives, so I apologize if this was redundant. Could this be moved to a decision soon? Thank you, Chris Allen
I am fine with this. Related to our recent discussion: we should probably require that this be protected by a language extension, like all other literal notations. Perhaps `UnderscoreLiterals`? -Iavor PS: technically, this is not backward compatible :-) Here is an example: instance Num b => Num (a -> b) where fromInteger = const . fromInteger test :: Integer test = 1_1 where _1 = 2 Currently this evaluates to 1, but with the extension it will evaluate to 11. I don't think that any real code would be affected by this, I just had a bit of fun writing it. On Wed, Nov 1, 2017 at 2:33 PM Christopher Allen <cma@bitemyapp.com> wrote:
https://github.com/ghc-proposals/ghc-proposals/pull/76#issuecomment-33995299...
This appears to have near universal approval. It's certainly a feature I've been grateful for when writing Rust code. I wasn't able to find a thread about this proposal in my email archives, so I apologize if this was redundant.
Could this be moved to a decision soon?
Thank you, Chris Allen _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
I have not dug into the details, but the general direction of this proposal looks fine to me. Simion From: ghc-steering-committee [mailto:ghc-steering-committee-bounces@haskell.org] On Behalf Of Iavor Diatchki Sent: 01 November 2017 22:52 To: Christopher Allen <cma@bitemyapp.com> Cc: ghc-steering-committee@haskell.org; Joachim Breitner <mail@joachim-breitner.de> Subject: Re: [ghc-steering-committee] Underscores in numbers proposal I am fine with this. Related to our recent discussion: we should probably require that this be protected by a language extension, like all other literal notations. Perhaps `UnderscoreLiterals`? -Iavor PS: technically, this is not backward compatible :-) Here is an example: instance Num b => Num (a -> b) where fromInteger = const . fromInteger test :: Integer test = 1_1 where _1 = 2 Currently this evaluates to 1, but with the extension it will evaluate to 11. I don't think that any real code would be affected by this, I just had a bit of fun writing it. On Wed, Nov 1, 2017 at 2:33 PM Christopher Allen <cma@bitemyapp.com<mailto:cma@bitemyapp.com>> wrote: https://github.com/ghc-proposals/ghc-proposals/pull/76#issuecomment-339952996<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals%2Fpull%2F76%23issuecomment-339952996&data=02%7C01%7Csimonpj%40microsoft.com%7Cd576f1b858a74aa4072e08d5217b4867%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636451735748183647&sdata=WqWuPZ4czfYVVWP6Q%2B0%2BRnMF0j1MSdgJZS4VvY7%2FzYQ%3D&reserved=0> This appears to have near universal approval. It's certainly a feature I've been grateful for when writing Rust code. I wasn't able to find a thread about this proposal in my email archives, so I apologize if this was redundant. Could this be moved to a decision soon? Thank you, Chris Allen _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org<mailto:ghc-steering-committee@haskell.org> https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
participants (3)
-
Christopher Allen -
Iavor Diatchki -
Simon Peyton Jones