Skip to content

Feature request: allow digit separator after 0b or 0x #12680

@jskeet

Description

@jskeet

This was previously requested in a comment on #216 (and I independently viewed that thread precisely to see if it was already valid).

With VS15 Preview 3, we have:

Valid:

var x = 0b1010_0000;
var y = 0x1234_abcd;

Not valid:

var x = 0b_1010_0000;
var y = 0x_1234_abcd;

I find the latter more readable than the former. While I can see the reason why digit separators before just digits isn't valid (e.g. _1, which is a valid identifier), the leading 0x or 0b already prevents the token from being an identifier.

// cc @zippec

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions