3 ms·
For me, the key bit of learning that unlocked my ability to switch between OO paradigms was actually assembly programming. Having an understanding of how C++ t
by bdg 14y ago
For me, the key bit of learning that unlocked my ability to switch between OO paradigms was actually assembly programming.
Having an understanding of how C++ types, strings, structs and finally objects all impacted the stack and memory, then being able to actually create something in x86 let me 'see' how classes create objects, and also got me over the 'how do pointers work?!' hurdle.
It might be entirely counter-intuitive, but learning assembly was the key to me being able to shift OO-gears. Today I write in PHP and JS, and the only thing that I find myself stumble over when moving back-and-forth are weird things like the `this` scope of setTimeout returning to global space when invoked locally.
- Ovid 14y agoInteresting. For me, I learned OO with Perl (scary, I know), but really started grokking it when I learned to Java. Finally, I started studying Smalltalk and when I found out that it doesn't have "if" statements (it creates boolean objects you can send ifTrue/ifFalse messages to said objects). Once I grokked that, it was like my eyes opened. I still have more to learn, but OO programming is so much easier and more pleasant after understanding how multiple languages approach it.