-
Notifications
You must be signed in to change notification settings - Fork 65
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
Byte literals #111
Comments
Seems like a no-brainer. In addition to SB, could just B also be added for (what I consider to be) the most common case - signed byte (either 1SB or 1B would be accepted)? |
Why
|
Because in Hex B is a digit. Also because Byte is inconsistent with the other types in that the "default" is unsigned, so we weren't sure people would see 255B and know that it's (crap, I've forgotten while writing this what it is)... Signed (and an overflow, technically). Lastly, since UB is by far the more common case it's not that important to optimize SB. |
Ah yes, good point, because I'm good with |
^^ same as @reduckted! I hadn't thought of a suffix after a hex literal but of course. |
Dupe of #213 |
There's no way to express a Byte in VB. It can be a pain in some cases involving Option Strict. It also seems arbitrary since all the other numeric types have a suffix. We discussed this in a previous LDM and came up with SB and UB as the literal suffix for signed byte and unsigned byte respectively.
Seems cheap and consistent.
The text was updated successfully, but these errors were encountered: