From: bbense+comp.lang.ruby.Sep.26.02@... Date: 2002-09-27T05:16:47+09:00 Subject: Re: adding overload to ruby -----BEGIN PGP SIGNED MESSAGE----- In article <58108207664.20020926155617@integ.ru>, Bulat Ziganshin wrote: >Hello dblack, > >Thursday, September 26, 2002, 3:28:42 PM, you wrote: > >>> why you don't want to add overload to mainstream ruby? > >dcsn> For me, it's because, as you pointed out, it doesn't correspond to the >dcsn> dynamic spirit of the language. There are already languages without > >pros: > >1) ability to declare several functions with different arguments - - I don't view this a Pro. >2) enhanced reliability because argument types declared explicitly, >not through dynamic using its methods - - This is a con. >3) enhanced readability of program, self-documenting - - This is only true if you believe 2 above. > >of course, second and third becomes more important when application >grows > >cons: >1) we can't fake overloaded function with object of another type >.. more? - - IHMO, this is a core feature of Ruby. Once you break this you don't have Ruby any more. Yes, I realize it's possible to break it with the current ruby implementation, but you have to work at it. > >may be you don't understand me. ruby core will use old style, new >declarations will be more appropriate for application code, where >flexibility is not so great demand and reliability is more important > - - I understand you perfectly. I just don't believe that type checking improves reliablity. What you really want is type checking in Ruby, you are just hiding it under the cloak of method overloading. If you really believe that type checking is that important, then you should probably be using another language. - - Booker C. Bense -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBPZNopmTWTAjn5N/lAQGhPwP/QSIQJJcgo3iToo7T/61zREjEV5JVSCV7 fWsFnU62vd1Pgev8bObqNC5MvSrpdE4Jj8+D5Ck99xgVMDeaPyo/rIDfXeVjCoWh D8DiZhf/3o090WWdZlW3o8HH9nVbwGNFK+DRFfOoMheVdRsTsCTYQWHnjeN5QqcT ORakq8jdrkk= =DcMr -----END PGP SIGNATURE-----