Technologies to Watch: A Look at Four That May Challenge Java’s Development Dominance
Subject:   What decade was that?
Date:   2005-10-22 01:47:52
From:   Danie
Response to: What decade was that?

Python is not OO to its core.

To qualify, it must at least adhere to the "everything is an object" principle. In Ruby (and Smalltalk) everything are objects. Even numbers. You can do this in Ruby:

class Fixnum
# Redefine +
def +(other)
"Addition is now obsolete"
puts 5 + 2

The result will that string.

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Do your homework
    2005-10-22 06:32:19  jpersson [View]

    All the numeric types are also represented as objects in Python, so I recommend you to do you homework before you start critizing other languages.

    The two languages are actually quite similar when it comes to OO-features (the most notable exception is probably that Ruby lacks multiple inheritance), but part of the Ruby community seems to think that the only way to get any attention is to pick on other languages and by selling in Ruby as a better Python.

    Coming from Python I'm having a hard time seeing what invention Ruby has brought into the game, but then again I rather see Ruby growing into a viable alternative than to have to program in Java for the rest of my life.
    • Do your homework
      2005-10-24 23:12:33  Ged.Byrne [View]

      I should have worded myself better. It isn't that Python isn't OO, its that python doesn't feel OO.

      Python is multiparadigm, which means that it actually brings more to the table than Ruby. The average Java programmer could probably benefit from learning Python much more than Ruby because it will teach them more.

      And that is the problem. So few programmers want to learn new stuff.

      If they are building a class, they'll follow the path they've always followed:

      "I'll start with the private members. How do I declare a private member in Python. What, no encapsulation! I need an OO language!"

      Obviously they're wrong, but it doesn't take much to take a programmer out of their comfort zone.

      With Ruby they get to follow the familiar path, declaring Java like objects in Ruby the same way they that C programmers were once able to write C like code when they started using Java.