2 ms·
Amusingly enough, I found that the compiler also accepted MyEnum.len (completely undocumented!). That was an easter egg! But I'm trying to update the docs for
by lerno 1y ago
Amusingly enough, I found that the compiler also accepted MyEnum.len (completely undocumented!). That was an easter egg!
But I'm trying to update the docs for types now. It's reasonable to just have all the compile time type properties in one place so people can find them.
- johnisgood 1y agoI saw ".len" somewhere, I think I did mention it in my comment[1]. :) Thank you for updating the docs! [1] Oh, apparently I did, here: https://news.ycombinator.com/item?id=43954980 https://news.ycombinator.com/item?id=43954980, I quoted what I read in the documentation (?, may have been just on some part of the website) which included ".len", it is said somewhere as such: ".len or .elements returns the number of enum values".