On Wednesday 01 July 2009 02:47:29 pm Fabian S. wrote:
Perhaps. But if you are running 1.8.7, and writing code for general
distribution, is there not a real chance you will end up with code that
only works with 1.8.7?
This is a separate issue, and one you didn’t address.
That’s exactly why the Java guys have the worst API ever conceived
(at least as far as I know).
If everyone’s always whining about “No you can’t take that feature out”
or “No don’t change that behaviour” because it’ll break some legacy
code then real progress is never gonna happen.
Like anything in IT, programming languages and their libraries have to
evolve or they’ll just become a big heap of unusable deprecations.
That’s what 1.9 is about.
The problem comes when 1.8.7 breaks legacy code, and adds all these new
features, which are really all in 1.9 anyway. The only reason you’d want
to
use 1.8.7 instead of 1.8.6 is to have those features, right? But the
only
reason you’d want to use 1.8.7 instead of 1.9 is you had legacy code
that
breaks in 1.9.
So you’re basically trying to have it both ways, which really doesn’t
make
sense.
Now, in practice, 1.8.7 doesn’t seem to break much. Most of what was
broken by
1.9 seems to be C extensions, and most gems that it makes sense to fix
seem to
have been fixed.
But it seems really strange that anyone would rely on 1.8.7 for
production
when 1.8.6 is still stable, being maintained, and unlikely to break
anything.
Also, I had the experience that the 2 or 3 features of 1.8.7 you use, which
are not present in 1.8.6 are fairly easily emulated, e.g. Array#group_by
and fellows.
True. For that matter, I often add things like Object#tap and
Symbol#to_proc.
It’s fairly trivial to detect if these things exist, and add them if
they
don’t – and they’re one-liners anyway.
The problem is, I now have to test my code on 1.8.6, to make sure those
shims
work, and on 1.8.7 and 1.9.1, to make sure the real behavior is left
alone –
and that my shim is compatible with the real implementation.
Frankly, I see absolutely no point to 1.8.7. It may have made sense
while
people were waiting for 1.9 to stablize, and for gems to be ported, but
all
that happened absurdly quickly.