4 ms·
I don't think objects unavoidable lead beginning programmers to get lost in "architecture." My go-to language for teaching new programmers is Ruby--in part bec
by jarrett 16y ago
I don't think objects unavoidable lead beginning programmers to get lost in "architecture."
My go-to language for teaching new programmers is Ruby--in part because it's my strongest language, but also because it's capable of expressing most programming problems intuitively.
Is Ruby object-oriented? Yes and no. Certainly, objects are core to its design. But it's also a scripting language that can be used purely imperatively. Or you can use it like a functional language.
What makes it so good for beginners, in my opinion, is that in Ruby, things are objects that naturally seem like objects. For example, it's very natural to think of a string as an object that can be passed around and manipulated, and Ruby makes this totally intuitive.
Writing "Hello world".downcase.sub('hello', 'goodbye') doesn't tempt beginning programmers to create bizarre class structures or reams of boilerplate code. But it does make you feel empowered, and because it's so darn logical, it makes programming seem way less scary to a beginner.
- jablan 16y agoAgreed. It's the hogs like Java, C# and C++ that gave OO a bad name. Moreover, in dynamic OO languages like Ruby, even scary things like design patterns usually take lot less time and lines of code to implement and, later, understand.