From: Charles Steinman Date: 2006-03-14T16:18:45+09:00 Subject: Re: Passing methods around Greg Buchholz wrote: > OK. I'm trying to get aquinted with the terminology. Would we say > that operators, methods, and messages aren't first class entities? > They're second class citizens, like functions in C (you can't create > new functions in C at runtime, but you can do quite a bit with function > pointers). Does that sound about right? Nah. You're confusing syntax with identity. The token "*" there is not itself a method -- you can't assign it to a variable or anything. It just tells Ruby to call a method. But you can dynamically generate methods, and you can store a method in a variable -- just not with that syntax. Actually, Ruby is the opposite of C as far as what you can do at runtime. Ruby is all about runtime. For instance, when you're defining a Person class and you write "attr_accessor :shoe_size", you're calling a method that dynamically creates (at runtime) the methods "shoe_size" and "shoe_size=" and defines them to get and set (respectively) the instance variable @shoe_size. Some people have made classes that actually define methods as they're called.