From: bbense+comp.lang.ruby.Sep.26.02@... Date: 2002-09-27T08:18:14+09:00 Subject: Re: adding overload to ruby -----BEGIN PGP SIGNED MESSAGE----- In article <3D936F26.1040909@path.berkeley.edu>, Joel VanderWerf wrote: >bbense+comp.lang.ruby.Sep.26.02@telemark.stanford.edu wrote: >.. >> - - This is not Ruby. If you really want typed arguments, then you >> should not be using ruby. It isn't for everybody. This overload >> proposal is nothing more than the camel's nose of strict typing >> peeking into the tent. > >As has been said recently, multiple dispatch is not type > checking. - - I guess we'll just have to agree to disagree. Just because someone said it doesn't make it true. I can't see how you put multiple dispatch into the core without doing something that looks an awful lot like type-checking. I don't buy your premise. Unless we agree on premises there is very little argument can settle. > If >you believe that it is, why don't you believe that the following code >shows that ruby has "typed arguments" > > > "foo".reverse > [1,2,3].reverse > >Why do you feel differently about the receiver than about additional >arguments? Multiple dispatch just has more receivers... - - Sorry, I don't follow this at all. To me it demonstrates exactly the point I was trying to make. All I need to know is whether you can do reverse or not. > >BTW, many people would say (and have said) that Ruby is strictly (or >strongly) typed. It's just not statically typed. > - - Let's put it another way. Multiple dispatch violates the principal of object independence. Why does your class need to know the internals of my objects? It encourages the creation of fragile code that will fail every time the external environment changes. You're coupling your implementation to the details of specific objects. While ruby can't stop you from writing fragile code, it can at least not encourage it. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPZOTCWTWTAjn5N/lAQG/WQP/T1Dv0rtnh2oIyAXIgHRHPx/VjO/bfq4V AkB/p4lZqwg+e4X5TisbMNcFL7JDa1kiRVmRA8awJeDBkktvhy4gIA+I/DGjC0MT f4b4aBG3my09mQsBgMmN0uZEC0dyzSuGIxtxX+rED7sy3Y1e42mVYVrp5unGxu7X Z+Nmf1s2AwQ= =PZO8 -----END PGP SIGNATURE-----