tag:blogger.com,1999:blog-14415229.post5477345850588125650..comments2023-10-10T16:55:02.139+02:00Comments on Chase The Devil: Features That Ruby Lacks and Java HasFabienhttp://www.blogger.com/profile/07288327695801480778noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-14415229.post-77849628248046628822006-02-11T00:57:00.000+01:002006-02-11T00:57:00.000+01:00Bertrand Meyer is barking mad.Bertrand Meyer is barking mad.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-14415229.post-49948084838750964912006-02-10T23:12:00.000+01:002006-02-10T23:12:00.000+01:00If you really care that everything in the collecti...If you really care that everything in the collection responds to a certain message, then you can easily enforce it by creating a DuckCollection, and overriding <<(object) or []=(object) to check to see if object.respond_to?(:message)Tonynoreply@blogger.comtag:blogger.com,1999:blog-14415229.post-24194814749014447132006-02-10T18:50:00.000+01:002006-02-10T18:50:00.000+01:00Maybe I misunderstood Ruby, but from what I have d...Maybe I misunderstood Ruby, but from what I have done with it, my impressions are:<br>- duck typing _is_ different from genericity. For example you can't put anything in a Collection[Duck] but with duck typing, there is no such check, there is actually no way to know you really have Ducks in your collection except by checking everyone of them.<br>- private things can be extended in Ruby. So there is no information hiding possible when you extend a class.Fabienhttps://www.blogger.com/profile/07288327695801480778noreply@blogger.comtag:blogger.com,1999:blog-14415229.post-86233948392519098662006-02-10T18:33:00.000+01:002006-02-10T18:33:00.000+01:00I fail to see how Ruby lacks information hiding an...I fail to see how Ruby lacks information hiding and genericity.<br><br>http://en.wikipedia.org/wiki/Duck_typingTonyhttp://weblog.halogenlabs.com/noreply@blogger.comtag:blogger.com,1999:blog-14415229.post-72105102169580364142006-02-10T18:32:00.000+01:002006-02-10T18:32:00.000+01:00Let's not forget its (and RoR's) lack of i...Let's not forget its (and RoR's) lack of i18n features! Here's an experiment -- go to the bookstore and look for a chapter (or even a sentence!) on i18n features in RoR or Ruby in the two main published books. Can't find a chapter? Can't find a sentence? That's because it's not there.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-14415229.post-49581590429536251092006-02-10T17:41:00.000+01:002006-02-10T17:41:00.000+01:00- Java really doesn't have first class support...- Java really doesn't have first class support for pre/postconditions, although you can fake it with some 3rd party tools (JContract I think?). In reality you could probably add first class support for that in Ruby since all classes are open.<br><br>- The value of static typing is dubious and could be debated until the end of time.<br><br>- Java's generics are hacky and erased at runtime anyways.<br><br>- The libraries available for Java is a major strong point, I'll give you that one. Performance - eh, its not like we are writing device drivers or operating systems in either of these languages.<br><br>Two other pluses you forgot for Java - the countless programmers available, and the acceptance at the corporate level.Rob Sanheimhttp://www.robsanheim.comnoreply@blogger.com