From: Robert Klemme Date: 2006-06-17T22:39:52+09:00 Subject: Re: self-similarity or closure in ruby 2006/6/17, uncutstone wu : > It seems > In lisp, everything is expression > In smalltalk, everything is object > In Ruby, > everything is an expression > everything is an object > > This kind of characteristic is called closure. > It is also a kind of self-similarity. > > It seems self-similarity or closure will give ruby many benefits. > > But what's the benefits we can get? I appreciate your opinions. Everything is an object - there's a certain set of methods that can be invoked on any instance, like #to_s, #hash etc. See Obejct.instance_methods() - anything can be stored in a variable (not like Java for example where you cannot store POD values in a variable of type java.lang.Object) - generally every value can be treated in a generic way Everything is an expression - I don't see that much advantage from this in a language like Ruby, probably one of the most useful features together with the fact that everything is an object is that you can chain values through boolean operators like x = a || b || c. Just some thoughts Kind regards robert -- Have a look: http://www.flickr.com/photos/fussel-foto/