From: Fabian Streitel Date: 2009-07-03T17:21:30+09:00 Subject: Re: Best OS packages for Ruby? --0015174bdc70a7dc19046dc8d71c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit well, then just write your scripts in 1.8.6, where's your problem? If you need it to be distributed everywhere, why bother with 1.8.7? I don't get your point. > These features alone are a problem. If you write your shiny new script > on ruby 1.8.7 and give it to somebody with ruby 1.8.6 then it's very > likely it won't work unless you were very careful and did throughout > testing on earlier rubies. > Try multiruby > > 1.8.7 adds a bunch of simple and useful utility functions which you ca > easily emulate (an which you have most likely written in one form or > another for your earlier code) but there is no warning in the docs or > a runtime compatibility check or something. > How should that work? Everytime you use a bit of code that changed since the last minor release you get a warning? I'd very much doubt that that would be practical. My code alone would be flooded with warnings. The docs seem like a good idea though. I think if RI would list the date of the introduction of the member functions, that would help a lot discovering such cross-version bugs. Nevertheless I think you're mistaking Ruby for Java here... If you want something like compile-time warnings about deprecation, an interpreted language is probably not the best way to go... So instead of writing the utility functions as you did in 1.8.6 you > will have to write a check that the method you want is already > present, and only after you find out about the additions. Not exactly > an improvement. > I don't see your problem? If you already wrote the functions for 1.8.6, all you need to do is wrap them inside if RUBY_VERSION != "1.8.6" endif or something similar. > It may be the standard way on Windows or OS X but on Linux/UNIX you > send the script and expect it to tun on any system with reasonably > recent interpreter of your favourite language. Then write for 1.8.6! It would be much nicer if the new features were released separately as > a package that could be installed on top of both 1.8.6 and 1.8.7 for > people to test and enjoy when they are interested without the need for > the stuff to be present at all times. Unfortunately it was not done > that way so you get all or nothing. So basically what you suggest is that we sticked with Ruby 1.0 and froze that and released ALL the features after that in thousands of tiny patches which everyone would have to apply manually just for the sake of never ever breaking a single line of code? Doesn't sound very promising to me. Greetz k --0015174bdc70a7dc19046dc8d71c--