elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.51k stars 656 forks source link

Feature Request: Add binary literal #2183

Open Inc0n opened 3 years ago

Inc0n commented 3 years ago

Quick Summary: Add binary literal syntax to elm, such as 0b1010 would to 10 in decimal.

SSCCE

Enter the following in elm repl

> 0b111
|
-- WEIRD NUMBER ----------------------------------------------------------- REPL

I thought I was reading a number, but I ran into some weird stuff here:

3|   0b111
      ^
I recognize numbers in the following formats:

    42
    3.14
    6.022e23
    0x002B

So is there a way to write it like one of those?

Additional Details

github-actions[bot] commented 3 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.