Open
Description
I've always wished I could write this:
{
xScale: 15M,
yScale: 100K,
zScale: 2.5M,
}
Instead of this:
{
xScale: 15000000,
yScale: 100000,
zScale: 2500000,
}
It's just difficult to read, especially when there's more numbers. I have to stop and think kind of hard and look at the numbers carefully, and count the digits to make sure I'm not making a mistake.
Could do this:
{
xScale: 15 * 1e6,
yScale: 100 * 1000,
zScale: 2.5 * 1e6,
}
But it's so verbose that I'd forget to use it.
It would be amazing if we could write numbers as simply as 100K
. I understand how this feature request might seem a little radical, but I think the purpose of the language is to describe information, and the feature scope of being able to describe information as 100K
is not all that different from 100 * 1000
.
Reasons this could work:
- It's forward compatible and wouldn't break any existing Jsonnet
- No ambiguity or parsing problems
Metadata
Metadata
Assignees
Labels
No labels