From: bbense+comp.lang.ruby.Sep.26.02@... Date: 2002-09-27T08:58:44+09:00 Subject: Re: adding overload to ruby -----BEGIN PGP SIGNED MESSAGE----- In article <1033082158.836330.12050.nullmailer@picachu.netlab.jp>, Yukihiro Matsumoto wrote: >Hi, > >In message "Re: adding overload to ruby" > on 02/09/27, Mauricio =?unknown-8bit?Q?Fern=E1ndez?= writes: > >|One foolish way I can think of would be the following: >| >|def do_foo(b) >|# used when b can respond to sort and bar >|end > >I like the *concept* of this idea. > - - You should probably look at the extensions NeXT made to Objective C. One of them was the concept of "protocol", Ruby Mixin's is kind of close, but the idea was that you would have a central list of methods that compromised a protocol that was independent of any implementation. - - Protocol's are supported in recent gnu versions of objective C. - - I still think multimethod dispatch is evil, but it would be a lot less evil if was based on methods rather than types. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPZObRmTWTAjn5N/lAQGceQP+IOhER64CDyeqQrMVtcHc3KOnMT8Q56ss HAMvK371juRPdFAJKsiNG6VNQtorHZmoevLSqP+Mb/8lxgX+gWeh+2bBC3SB5RrV dkIdEMY5CzJU0XAC67DGl2CKjBIwGZpNo+g4Jacf9IBQc4n9Uw8Aj7cI4PFzB+kN L+MSWYeQjcY= =4BmY -----END PGP SIGNATURE-----