I remember reading something a few years ago about the "this will eventually be
a compile-time error" thing being an inaccurate statement. If something like
that were added in the future, given Nim's direction, I would wager you could
probably get around it with a future compiler pragma.
It seems that I was not in a great shape yesterday. There are some errors in my
message.
Indeed, a set of _range[ '0'..'9']_ will occupy 58 bits rounded to 64, not 9
bits rounded to 16. I will have to declare _Digit_ as a _range[0..9]_ to use
only 10 bits (not 9!) rounded to 16 and, in this cas
Thanks, it works!
But, as this only hides the warning and doesn’t suppress the check , I hope
that, despite what is said in the message, this warning will never become a
compile time error.
{.push warning[ProveInit]: off.} and {.pop.}.
Hi,
When trying to solve some project Euler problem, I declared something like that:
import tables
const N = 16
type Digit = range['0'..'9']
var counters: array[N, TableCount[Digit]]
var exclusion: array[N, set[Digit]]
. . .
Run
and got the usual wa