Wednesday, November 14, 2007

Ruby And All That

I read the post "Is Ruby the New VB?" on TheServerSide Interoperability Blog with interest. Even more the later discussion "Interop Blog: Is Ruby the new Visual Basic?".

And I decided to put some excerpts on my notebook.

Posted by: Paul Beckford on October 31, 2007

The reason why both Sun and Microsoft are jumping on to Ruby is because they both have a lots of clever people that really understand OO and functional languages like Smalltalk and Lisp. Sun did a lot of research on OO, specifically with Self, and Microsoft has a massive research budget and has been doing lots of interesting stuff with functional programming ideas such as LINQ.

I remember reading articles by people who were struggling to build OO component frameworks in the early 90's with C++. Who remembers Taligent, OpenDoc and SOM? CORBA and COM are other examples, and let's not forget 'OO' Operating System attempts like Pink. All these things failed because C++ was not OO and wasn't the right tool for the job. Yet marketing bosses insisted that an inappropriate hybrid language derived from C was used because that was the incumbent technology of the day.

What I find interesting is that a Japanese home hobbyist has knocked up a true OO language in his spare which has gone on to be "adopted" by "Software" companies like Sun and Microsoft with multi-million dollar research budgets :^).

What is the lesson to be learned here? Firstly vendors will sell you what ever it is they think you will buy, and secondly we end up with the technology we deserve.

As far as OO is concerned the mainstream is mostly in the dark ages and IMHO the average Java programmer still doesn't fully appreciate what OO is all about (i.e message passing). Without open source language efforts like Python, Squeak and Ruby mainstream programming was destined to stay in the dark ages for an eternity, and vendors would happily have carried on selling us so called "OO" manure like EJBs 2.1.


Posted by: Paul Beckford on October 31, 2007

<...> Ruby is even more like Smalltalk. In Ruby only message sends are supported and there are no hard wired function calls allowed at all; and of course Ruby as uniformity where everything is an object. This explains why Ruby can support advanced OO abstraction techniques like Mixins.

My main point is that both Sun and Microsoft know all this stuff and they have known it for quite some time (say about 30 years :^)). It is for these reasons that they are now jumping onto the Ruby bandwagon (higher programming abstraction and higher developer productivity).

The only people that seem to be in the dark about this stuff is the mainstream programming community who have seemingly bought the misleading OO marketing spiel pushed out by these very same vendors hook line and sinker.


Posted by: Paul Beckford on November 02, 2007

<...> Sun and Microsoft are aware that a popular Smalltalk-like language could gain significant market/brain share. I think they see this as a potential threat to the current encumbent technology base (Java/J2EE and C#/.Net) and hence to themselves.

As such, they want to ensure that they have a signifcant stake in "what ever comes next". From their perspective this is just sound business sense.

I'm sure that both Microsoft or Sun would love to "own" mainstream software development by having everyone use C# or Java, but with the rise in popularity of open source languages I think they both realise that this now unlikely.

In addition to this as pointed out by Frank and Cedric, these corporations don't speak with a single voice. Some within these organisations have wanted to promote alternative languages for years. IMO it has been the business/marketing sides of these companies that have put out the "golden hammer" message when it comes to their own "proprietary" programming languages, and have chosen to promte an interpretation of OO that places their languages in a favorable light.

I don't blame them for this, after all they are in business to make money for their shareholders. I just wanted to draw attention to how we the developer community have done a poor job of maintaining any semblance of control over the types of tools we are obliged to use on a daily basis.

Posted by: Huw Collingbourne on November 05, 2007

Dolphin Smalltalk! Now you and I are definitely thinking along the same lines. I love(d?) Dolphin Smalltalk and I was very disappointed when Object Arts (who made it) decided to stop future development. It constantly amazes me how many great ideas were put into the 'original' Smalltalk towards the end of the '70s/early '80s and which have still not been taken up by modern languages and IDEs.

One of the things I find frustrating about many Ruby programmers' coding style is that they create 'flat' class hierachies - i.e. everything descends from Object - and populate them with long and complex methods, whereas Smalltalk programmers typically create dense hierachies (with many levels of descent) but very small methods (as only the differences from ancestor methods need to be coded). To a large extent, I think this is explained by the fact that the Smalltalk language is provided with an environment optimized for OOP so it's easy to create complex family trees whereas, until quite recently, there were no decent IDEs for Ruby at all.

But there is still a long way to go before Ruby coding becomes as OOP-friendly as Smalltalk. It does seem bizarre in the 21st Century to be looking back to a language/IDE produced in the '70s and '80s but I really do think that there is much about Smalltalk that still seems surprisingly 'modern'.


Lyrics
Eddy Arnold (1948)
Bouquet of roses

I'm sending you a big bouquet of roses
One for every time you broke my heart
And as the door of love between us closes
Tears will fall like petals when we part.

I begged you to be different
But you'll always be untrue
I'm tired of forgiving
Now there's nothing left to do.

So I'm sending you a big bouquet of roses
One for every time you broke my heart.

--- Instrumental ---

You made our lover's lane a road of sorrow
Till at last we have to say goodbye
You're leaving me to face each new tomorrow
With a broken heart you taught to cry.

I know that I should hate you
After all you've put me through
But how can I be bitter
When I'm still in love with you.

So I'm sending you a big bouquet of roses
one for every time you broke my heart...

No comments: