Yep. After reading all the examples, I know that all vehicles have wheels, but cars have a variable number of doors, whereas motorcycles don't have any.
Now, for step two, I just need to find a large automotive manufacturer that's completely brand new to the idea of software, and I'll be able to nail that interview...
It’s a funny joke. But there are some very real difficulties with classical inheritance, the main one being “what is a class”? If a class if an object, then it must necessarily have a class of it’s own, so what’s the class of Class? Logically, the class of Class is Class, so you have a circular inheritance loop at the top of your hierarchy.
Alternately you can say that a class is not an object, it is syntax. This creates a whole other set of problems. Where do you put your static methods? How do you manipulate classes? You need a whole introspection API.
JavaScript sidesteps all these issues with prototypical inheritance, which is way simpler.
This is why i hated C++ when it came out (yes im that old) i came from c, forth, asm etc which were clear logical languages. Then he drops what my young self called "phiilosophical bullshit into the thing i loved. I eventually had to read a book on general OOP to get it. (I got mediocre..not good). Now im older and get why its incredibly useful in large and team encironments. Still be superhappy to point out its flaws. C++ is the one language you just might accidentally create General ai in by programming while stoned. And not have anyone including yourself able to understand what you did later. "Wait is that recursive inheritance between three classes?"
People do understand quantum mechanics. When Feynman said it he meant that QM is not intuitive to us. But guess what? There are a lot of things in classical physics that are not intuitive, e.g. diffraction.
A few years ago, I was trying to get some audio streaming software working, and I kept coming across an error message every now and then which would stop the stream and render the software useless for what I needed. (From memory it was Darkice streaming either from a Raspberry Pi (model B) or an old pre-Intel Mac running Ubuntu.) (Spoiler alert: I never got it working, and gave up and used different hardware and software instead.)
I searched the error message, and there were few results, and fewer that actually were relevant to the problem in hand. One looked promising though, almost the same error I was getting and in the same circumstances. I clicked the link with trepidation yet some excitement, hoping for the shining gold of a nice easy fix, the silver of a hack that could get me through the task in hand, or the tarnished bronze of enough information that would direct me roughly in the right direction to fix the problem.
What I ended up with was a one-post thread on a forum outlining the problem and what had been attempted to fix. Posted by me, a year or two previously when attempting to get this thing working before. And still no replies.
98
u/[deleted] May 16 '21
Did you ever figure out inheritance?