Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support underscores in numeric literals in GDScript #12928

Closed
RiverMesa opened this issue Nov 14, 2017 · 0 comments
Closed

Support underscores in numeric literals in GDScript #12928

RiverMesa opened this issue Nov 14, 2017 · 0 comments

Comments

@RiverMesa
Copy link

A small, yet useful syntactic feature of at least a few other programming languages (Java, D, Crystal, probably others) is the ability to use underscores (_) in numeric literals (integers, floats etc.) for readiblity purposes - which I think would be a nice addition to GDScript, improving the readibility of some larger numbers, allowing for this

var some_large_number = 10_000_000

which is certainly a bit easier to read at a glance than

var some_large_number = 10000000

Which seems fairly in line with GDScript's design goal of being easy to read and learn.

(And while to me it mostly seems maybe-simple-enough to sneak into 3.0 still, I think it would be more appropriate to add in 3.1, which if I recall correctly a bunch of GDScript changes and improvements are planned? If this is desired, that is.)

@neikeq neikeq modified the milestones: 3.0, 3.1 Nov 14, 2017
bojidar-bg added a commit to bojidar-bg/godot that referenced this issue Nov 15, 2017
@akien-mga akien-mga modified the milestones: 3.1, 3.0 Nov 16, 2017
@akien-mga akien-mga changed the title Feature proposal: Support underscores in numeric literals in GDScript Support underscores in numeric literals in GDScript Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants