> Use a statically typed language with algebraic data types.
> Use zero and empty string as special "unknown" values.
Old habits die hard
Reminds me of C++ lol :D
So you're supposed to do RAII, right? Eg. if you have a file stream object thingy, it should open the file in constructor. And if constructor fails, it should throw exception, right?
Except even C++ standard library doesn't do that. Eg. fstream's constructor silently ignores errors, as do most of its methods, and you need to explicitly call .good() or sth to check for errors.
@normandy I mean, you often *have to* do things the old way because nobody bothered to rewrite old parts of STL the new way.
Also, C++03 was the peak of C++
@normandy IMO, every large C++ project should have its own implementation of standard library's functionality under util/. Own classes for strings, files, sockets, and whatnot.
A lonely little town in the wider world of the fediverse.