Re: Re: Curious about method handling
Isaac Gouy <[email protected]> Fri, 5 Aug 2005 12:41:54 -0700 (PDT)
| Newsgroups | gmane.comp.lang.nice.general |
|---|---|
| Message-ID | <[email protected]> |
The question you quote began with "Also". The first question was: 'The former command prints "#<procedure f>", whilst the latter prints "Hello World". Why the difference in syntax between class methods and non-class methods?' --- Artem Gr <[email protected]> wrote: > > Maybe I'm missing the point of the original question, or maybe > you're > > missing the point of the original question ;-) > >=20 > > For a function, we can both refer to the function and refer to the > > result of the function: > > f > > f() > >=20 > > I think the original questioner wanted to have those same two kinds > of > > reference but for an object method: > > new A().g > > new A().g() >=20 > The question was: >=20 > "Also, is there any way of passing a class method as an argument > without > wrapping it in an anonymous method?" >=20 > To wich the (not tested) example is: >=20 > // Pass the A.g class method to the repeater. > repeatOnA( new A(), g ); =09 ____________________________________________________ Start your day with Yahoo! - make it your home page=20 http://www.yahoo.com/r/hs=20 =20 ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic= es Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q= A Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf