From: Mathieu Bouchard Date: 2002-01-15T07:35:18+09:00 Subject: Re: a wishlist for ruby 2.0 On Tue, 15 Jan 2002, Mathieu Bouchard wrote: > On Mon, 14 Jan 2002, Daniel Berger wrote: > > That would be considered an lvalue sub, right? How do most other correcting typos, + other improvements...: > but has an additional argument separate from the main argument lisp. main argument _list_. =) > (defmethod (setf my-blah) ((my-class self)) > (my-other-blah (my-frob self))) (defmethod (setf my-blah) (value (self MyClass)) (setf (my-other-blah (my-frob self)) value)) > which in Ruby is: > def my_blah value > my_frob.my_other_blah = value > end forgot the equal sign in the def (this is #my_blah= ) > but Ruby doesn't support additional arguments, while CommonLISP does. > Imho it's useful when you want several methods like #[]=, but can't > because #[]= is the only name you can give it. and those three lines were the real point. ________________________________________________________________ Mathieu Bouchard http://hostname.2y.net/~matju