From: Daniel Schierbeck Date: 2006-12-31T07:47:41+09:00 Subject: Re: Little Things I mostly agree, with some of the additions of course being more important than others. On Sun, 2006-12-31 at 02:27 +0900, Trans wrote: > * object_class instead of class. I get sick > just looking at self.class.foo. And it prevents use of > "class" for other variables/methods. (Hence the all too frequent use of > "klass"). object_class on the other hand is nicely > analogous to object_id. I completely agree here. > * Allow a comma between the two alias arguments --getting > an error on that is really annoying. Actually why is alias > a keyword? Why have both #alias_method and > alias? I have always been told that keywords were to be > avoided. I would personally prefer that the `alias' keyword be removed, but I have noticed how at least one prominent Rubyist, which has my utter respect, tends to use it all the time. Nonetheless, be gone with it! > * A block can't take a block, nor default arguments. What kind of > define_method is this? I realize this a trickier issue. > But at some point the trick has to be performed. +1 > * Another hassle when metaprogramming. #send should work > for public methods only! There's a big issue with backward > compatibility here. I have the solution: #object_send. > It's a better name anyway b/c it stays out of the way (eg. my Email > module would like to have a #send method, you dig?). And #send itself > could be deprecated slowly. BTW #funcall for the alternate > private-accessing send is a terrible name, try > #instance_send. (And yes, I'm begging here!) I agree that `funcall' is a weird name... "call a function". What function? I thought we agreed on calling them methods! Cheers, Daniel