[m-dev.] for discussion: design issue for new integer types
Zoltan Somogyi
zoltan.somogyi at runbox.com
Fri Oct 28 14:47:45 AEDT 2016
On Fri, 28 Oct 2016 11:25:31 +0800, Sebastian Godelet <sebastian.godelet at outlook.com> wrote:
> I know breaking symmetry is not always good but in this case I think that using only uppercase "L" and not allowing "uppercase i" or "lowercase L" would work better than not allowing any uppercase suffixes at all.
What are you proposing that a suffix L should stand for? Surely
not for "signed integer"?
I brought up lowercase L only because that was the old typewriter convention
that I was using to illustrate my point; the letter L is not part of the current
proposal in either lower or upper case.
> Additionally maybe "i" shouldn't be used at all since a) it is the default and b) it could be reserved for eventual inclusion of complex number literals
The proposal is that e.g. 42 as an 8 bit signed integer would be written as
42i8. Without the i, that is 428.
Complex number literals would need a more complicated syntax anyway,
since they include *two* numbers. They are also inherently floating point
numbers (I don't think I have even heard of anyone using the set of complex
*integers* for anything), so the presence of a decimal point in those numbers
would distinguish them anyway. (We currently use the presence/absence
of a decimal point to separate floats from ints.)
Zoltan.
More information about the developers
mailing list