2 ms·
I guess you mean this ? https://rachelbythebay.com/w/2022/02/21/result/ https://rachelbythebay.com/w/2022/02/21/result/ The type isn't described there as "Krol
by tialaramex 4y ago
I guess you mean this ? https://rachelbythebay.com/w/2022/02/21/result/ https://rachelbythebay.com/w/2022/02/21/result/ The type isn't described there as "Kroll result" perhaps out of modesty, but I also found no other reference to this type by that name, and it seems more like an unfinished thought than an actual type you'd use.
Rachel seems fixated on people learning a lesson from using it wrong, rather than shifting hard left like Rust's Result so that when you get this wrong your code doesn't compile the same as if you forget to quote strings, or you write the actual arithmetic product symbol instead of an asterisk. There is no need for this code to compile in order to "learn" something.
That's the same lesson which scraped into C++ 20 errata, to make std::format("{} {}", 5); into a compile error whereas previously it was ludicrously a runtime error. Maybe at runtime the literal 5 will be two values ? No. We don't need to execute this code to realise that it's wrong. Shift hard left.
- red_admiral 4y agoI do indeed. I think, reading between Rachel's lines, that she uses this in practice in her own projects? "Kroll result" is a term I just made up myself. I'm guessing Rachel's decision was not so much fixation and more that only the standards body (or the designer of a new programming language) could make something into a compile-time error, but a SWE/SRE can take a small step like this on her own.