3 ms·
The main reason why OO languages typically make everything objects is that having only one kind of type greatly simplifies the programming language and the expe
by mumblemumble 6y ago
The main reason why OO languages typically make everything objects is that having only one kind of type greatly simplifies the programming language and the experience of programming in it.
There are only three common languages that are OO with a few non-object types: C++, Objective-C and Java. This feature is universally recognized as a serious wart in all three of them. It creates all sorts of little edge cases that you need to learn to program around.
- blt 6y agoI'm curious to know which "serious warts" in C++ would be fixed by making everything an object.
- AlexSW 6y agoIndeed... in Java this is reasonably clear, but I've never found I have a problem in C++. I suppose if you're inheriting from your template argument and you template on an int? Seems awfully contrived and useless though.