Hi --

On Mon, 9 Jan 2006, Gregory Brown wrote:

>>> open class system
>>
>> Classes that can be changed (methods added, removed, etc.) at runtime.
>
> It's probably worthwhile to note that this makes things like irb possible, no?
> Seeing as the 'main' area of Ruby is just within an Object.
>
> Classes can be fully manipulated too, I'm not sure if this is part of
> a complete definition or not.  That classnames themselves are first
> class values and can be manipulated as such.

I'd make a distinction between the "classes are objects too" thing,
and the matter of what you can do *to* classes.  They could, for
example, be frozen, but still be first-class objects.  So there are
separate things going on.

>>> and the dynamic nature of ruby?
>
>> I like to think that Ruby does away with much of the compile time vs
>> runtime separation and that is a big source of it's dynamic nature.
>
> I like this idea.  My professor had the misconception about ruby that
> you could modify a class however you wanted, but could not remove it's
> original set of methods or undefine fields or things like that.  This
> misconception is due to the fact that static languages really do tend
> to make their class definitions rather solid, where they're as free as
> anything else in ruby :P

Another key aspect of dynamicness in Ruby is that objects are not
constrained by the set of capabilities with which they are born --
essentially, the divergence of type from class.


David

-- 
David A. Black
dblack / wobblini.net

"Ruby for Rails", from Manning Publications, coming April 2006!
http://www.manning.com/books/black