AnalogFile
6/25/2006 5:50:00 AM
joe wrote:
> Hi all --
>
> I shout my question to the entire Ruby + Smalltalk community: Smalltalk
> has had amazing IDEs for decades, why not Ruby? Smalltalkers, Ruby
> needs your help!
....
> What is holding Ruby back? How has Smalltalk overcome the issues?
> What can Ruby tool builders (such as the RadRails folks and, hopefully,
> me) learn from the Smalltalk IDE builders? Reasons I've heard for
> Ruby's lack of tool support include:
> - Ruby is not a compiled language
The totally interpreted nature of ruby is, IMO, what makes a Smalltalk
kind of IDE plain impossible.
Smalltalk does have interactive read-compile-execute support. But it is
mostly compiled. Classes are compiled in and mostly you add methods and
class at development time, then use them at runtime.
You CAN add a method at runtime (because the compiler itself is an
object in the Smalltalk image). But that's not what you normally do.
Ruby is different. Sure you do have many classes available up front. But
mostly you create your classes at runtime. At EACH run the classes and
methods are recreated.
Here's something to get you thinking:
if ....
def ...
The def is probably adding a method to some class. But is it?
It actually depends on the if condition. That is it depends on runtime.
Maybe the above is within a method. And maybe that method is called 3
times and only after the 3rd call the if condition triggers and a new
method is added to some class.
Now: how's that supposed to be done in a smalltalk like IDE?
You may initially think of adding just the "main" definitions to the
types-database and consider the code above a runtime trick (like it were
a text string passed to smalltalk compiler at runtime).
Except EVERITHING in ruby is like that.
You generally do not intermix class and method definitions with
"executable statements". But that's just an mental abstraction of yours:
class and method definitions, in ruby, ARE executable statements.
Think about it.