3 ms·
I would also add that even in modern C++ it's possible to have the compiler check your usage of page and screen widths by creating separate types, ScreenWidth a
by jschwartzi 10y ago
I would also add that even in modern C++ it's possible to have the compiler check your usage of page and screen widths by creating separate types, ScreenWidth and PageWidth. You would then generate compiler errors on assignment, or provide single-argument constructors for implicit conversion.
It's just that nobody ever actually does that in C++.
- fiddlerwoaroof 10y agoThe people that want to do this just use Haskell :)