Hi --

On Tue, 10 Feb 2009, Akinori MUSHA wrote:

> At Tue, 10 Feb 2009 16:30:55 +0900,
> Brent Roman wrote:
>> I always liked the new hash symbol key colon syntax introduced in 1.9
>>
>> h = {dog: "bark", cat: "meow", horse: "neigh", programmer: "z z z"}
>>
>> It's especially nice in method invocations:
>>
>> animal.noises dog: "bark", cat: "meow", horse: "neigh"
>>
>> Is anyone working working on porting this back to 1.8?
>> Anyone else interested in this?
>
> Yes.  Backporting syntactic changes is a big part of the plan for ruby
> 1.8.8, although some features in 1.9 can never be integrated into 1.8
> because of compatibility constraints or implementation limitations.
> Considering those unfortunate cases, I am thinking of making the 1.8
> interpreter at least capable in parsing 1.9 specific constructs
> without error, although it may not be able to actually run it.
>
> That way, one would be able to write a script that supports both 1.8
> and 1.9 without avoiding 1.9 specific features.
>
>    # Note that the version comparison is considered as the last
>    # resort and for example, object respond_to? test is far more
>    # preferable and appropriate whenever applicable.
>    if RUBY_VERSION >= "1.9.1"
>      # fansastic code for 1.9 making full use of shiny new features
>    else # This part will be removed when you drop 1.8 support.
>      # legacy code that works for 1.8
>    end
>
> Honestly, I don't want ruby developers to hesitate to adopt 1.9
> features just because of the market/customer needs for supporting ruby
> 1.8, nor do like the situation where every developer is forced to make
> the ultimate choice among "go for 1.9, drop 1.8", "stay at 1.8, use
> 1.9 only as a faster 1.8", and "maintain two sets of codebase".

The problem is, though, that if a customer says, "We will only run
1.8", it usually either means 1.8.6, or else it means "We don't trust
1.9". I can't help thinking that the big thing is to get people to
trust 1.9, and to smooth out any remaining problems with 1.9. Right
now, it may be that the 1.8 "brand" has more trust, but that's just a
coincidence of the numbering. If 1.8.7 had been 1.9.0, and 1.9.1 were
2.0, there would not be the same branding effect. (I know that's just
speculation, but I do think that 1.8.x is having to play an awfully
large number of roles.)

I admit I've always been skeptical of the gradual migration approach.
I don't see how it plays out with actual code, and I've never talked
to anyone who actually does it or wants to do it. I know a few people
who have run 1.8.7 (I installed it to learn about it but don't use
it), but by far the majority of opinions I've heard amount to: use
1.8.6, or make the move to 1.9.

Can you put lots of warnings in 1.8.8, so people will see that it's a
bridge version? :-)


David

-- 
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2)

http://www.wishsight.com => Independent, social wishlist management!