Language: Add binary integer literals

Created on 2 May 2012  路  8Comments  路  Source: dart-lang/language

_This issue was originally filed by [email protected]_


When working with bits and bytes, having binary integer literals comes handy, as a lot of languages acknowledged (Python, Ruby, Java, even GCC has them as an extension). I believe that the reasoning behind adding binary literals to Java 7, as per http://mail.openjdk.java.net/pipermail/coin-dev/2009-March/000929.html, is equally valid to Dart, and therefore I propose to add binary literals in the same form ("0b100000" as an equivalent of "0x20"). I think that implementation is no concern (I did it in the VM and it was pretty straightforward, as I describe in http://ladicek.github.com/2012/04/29/hacking-the-vm-adding-binary-integer-literals.html).

feature small-feature

Most helpful comment

any news on this 8 years on?

All 8 comments

_Removed Type-Defect label._
_Added Type-Enhancement, Area-Language, Triaged labels._

_Set owner to @gbracha._
_Added Accepted label._

Probably should be treated in the context of a general radix indicator.


_Added this to the Later milestone._

_Removed this from the Later milestone._
_Added Oldschool-Milestone-Later label._

_Removed Oldschool-Milestone-Later label._

any news on this 8 years on?

No news, sorry. We've been focused on higher-value features like extension methods and non-nullable types. I do hope that we get to smaller quality of life features like this at some point, but we've got some more foundational stuff to do first.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

creativecreatorormaybenot picture creativecreatorormaybenot  路  3Comments

leonsenft picture leonsenft  路  4Comments

listepo picture listepo  路  3Comments

munificent picture munificent  路  5Comments

jonasfj picture jonasfj  路  3Comments