From: Mathieu Bouchard Date: 2005-02-25T19:33:16+09:00 Subject: Re: Where does this "global code" fit in? On Tue, 15 Feb 2005, Glenn wrote: > Now I understand that Ruby is pure-OOP. And I guess that class > "Window" is implicitly deriving from superclass Object. > It's the two lines at the end that confuse me. My natural though is > they are "global", but in a pure-OO world, they've got to fit into a > class somewhere? If so, are they actually fitting into (extending) > class "Object" in some way? Where? How? Don't be confused by how Java redefines pure-OOP (Java has too much influence on people's vocabulary and expectations). What pure-OOP is, outside of the Java bubble, is not that all code is in classes, but rather that all data is in objects. Some things in Ruby, like @-variables, aren't objects themselves, but are still sub-parts of objects. Some other things are not objects at all nor clearly part of objects, but there are few of them, and still the spirit of the language is to have most everything revolve around objects. The purest-OOP languages might be Self and Beta, both of which simplify/unify concepts to a degree that other language designers aren't daring to. Just below that extreme level you find Ruby and Smalltalk. A lower level of purity are languages in which OOP was retrofitted but deeply so (C++,Perl). A very low level of purity is languages in which OOP was designed in but instead feel like OOP has been badly retrofitted (in Java, compare float and Float, and how different they are, and how this breaks a sense of togetherness and consistency) _____________________________________________________________________ Mathieu Bouchard -=- Montr�al QC Canada -=- http://artengine.ca/matju