Open pjanck opened 2 years ago
Having an int_literal
might be a good option, although we could also argue that int is included in real_literal
. In order to have more type safety we would have to bind the metrics SIZE to an int_literal. Can you make a proposal?
I would vote for int_literal
instead of real_literal
. It also rounds up the basic types nicely (apart from char
, date
and byte
which are a bit debatable for checking purposes? 😄 ).
Yes for SIZE metrics, but we still need real_literal for VALUE metrics.
Misunderstanding. I have meant that instead of using real_literal
also for an integer, we introduce int_literal
.
we introduce
int_literal
Can you make a proposal?
Yes, I'll prepare a PR.
In order to have more type safety we would have to bind the metrics SIZE to an int_literal.
This isn't that easy with the generality of the grammar. Consider that real_literal
also doesn't make sense with TYPE checks - and that is not explicitly forbidden in the grammar. I believe that - as it currently stands - a note in the documentation suffices.
State
Documentation, chapter 4, grammar:
Documentation, Table 19, Description of metric values:
Question
value
cannot be type-safely an integer, although there is anint
defined in the grammar. Thoughts?Proposal
Expand
value
to includeint_literal
. I can prepare a PR if wished.