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
Language feature: Add support for binary literals #14546
Comments
This issue has been marked as stale due to inactivity for the last 90 days. |
In my humble opinion, we shouldn't close issues just because they haven't had any activity. This issue is an excellent example of why this policy doesn't work. |
Is it, though :-)? You could conversely say that this issue is an excellent example of why we need a stale bot. Is that an understandable explanation for the reasoning behind this policy and having a stale bot? |
I wasn't aware of this preference, so I'm sorry to have misused GH issues.
I wouldn't presume otherwise or presume this is a critical issue! I didn't mean to make you feel pressured if that was the case. That being said, the only reason to close this issue would be to make the number of open issues go down, right? As you said, this is a valid request that is clearly useful. Why close it? Thank you for taking the time to read this @ekpyron and for your effort in improving Ethereum. I just requested to open a topic in the forum regarding this language feature. |
It's mostly a matter of book-keeping - it's much harder for us to properly organize the issues and our work, if it's not just those issues that we plan to actually implement in the nearer future (we're not at a point in which that's the case for all open issues yet, but we're working towards that). There is also little value in having hundreds (it used to be even a thousand) issues on github, s.t. nobody can ever hope to work through them again and which will only be forgotten and outdated long-term, so that's what we try to avoid. |
This issue has been marked as stale due to inactivity for the last 90 days. |
Hi everyone! This issue has been automatically closed due to inactivity. |
I nerded out and tried to implement this at #15003. |
Implementation of |
The implementation itself is ready to merge, but we decided not to merge this and close the PR. Reasons:
|
I'm sorry that is the case, @pcw109550. Thank you for the fantastic effort, and I'm sorry I couldn't help you. I hope this will get accepted in the future. |
Abstract
There is no way to declare an integer using a binary literal.
Motivation
It is easier to use binary literal notation for several use cases. For example, when using bitmasks, it's more readable to write
0b00111111
than0x3f
. It probably makes sense to include support for octal literals as well.Specification
I'm not familiar enough with the codebase or the language to give a good specification. But binary literals should be supported wherever hex or decimal literals are.
Backwards Compatibility
Shouldn't be backwards incompatible.
The text was updated successfully, but these errors were encountered: