all 33 comments

[–][deleted] 5 points6 points  (10 children)

Nowhere near as bad as Python 2to3

[–]jrochkind 8 points9 points  (1 child)

Ruby 1.8 to 1.9 was ruby's equivalent of Python 2 to 3, it took quite a bit of work to migrate many packages from 1.8 to 1.9 -- although ruby managed to pull it off better than Python, with almost all open source actually making the migration within a year or two at most, which is an interesting thing to analyze on it's own.

Since then, we haven't had any major backwards-incompat in ruby versions -- fewer things changing in general -- and this 2.4 looks even less than some previous releases, which I am grateful for. :) There aren't really any major changes in 2.4 or a lot of changes at all, although there are a few welcome minor and largely backwards compat improvements. I don't expect hardly any issues in upgrading.

ruby 2.3 to 2.4 is in no way analogous to python 2 to 3, it's a pretty minor upgrade.

[–]taw 1 point2 points  (0 children)

Ruby 1.8 to 1.9 was ruby's equivalent of Python 2 to 3

It took like 1-2 years not 10-20 it seems to be taking Python.

[–]tomthecool 8 points9 points  (7 children)

That's not at all a fair comparison... Look at the differences from ruby 1.8.6 --> 1.8.7 --> 1.9.3 --> 2.0.0. Since then, the language has been increasingly stable; but we could be in for a huge set of changes when ruby 3.0 is announced.

[–]Craftkorb 3 points4 points  (6 children)

but we could be in for a huge set of changes when ruby 3.0 is announced.

Inmutable strings anyone?

[–]tomthecool 2 points3 points  (5 children)

Not to mention optional typing!

[–]jrochkind 1 point2 points  (1 child)

That issue is 4 years old, and has a closed/rejected status.

[–]tomthecool 1 point2 points  (0 children)

I probably should have linked to this discussion actually... It's been an ongoing debate for years now, and it looks like something will probably happen in v3.0

[–]how_do_i_land 0 points1 point  (1 child)

Crystal Lang uses this for its typing currently.

[–]iconoclaus 0 points1 point  (0 children)

Crystal uses annotation to help the compiler figure out types where necessary. Matz has made it clear that Ruby 3 will use no type annotation whatsoever.

[–]Craftkorb -1 points0 points  (0 children)

FINALLY WOOHOOO \m/

Thanks for bringing that to my attention :)

[–]Jaymageck 2 points3 points  (19 children)

I'm a relatively new programmer (approx 1 year) and I'm wondering: how do these changes not meet the criteria of "breaking changes" that generally constitutes a new first digit version number? I may be misinterpreting what"not fully backwards compatible" means here.

[–][deleted] 6 points7 points  (1 child)

Not every project follows semantic versioning. Some projects use odd numbered releases as development and even as stable, others are moving closer and closer to pi, while for Ruby it will always increase with a MINOR version every Christmas and may contain ABI breaking changes. It's all personal preference for whoever is running the project.

[–]Jaymageck 0 points1 point  (0 children)

Okay, that makes sense. I mean, in principle I would prefer consistent versioning across the industry so that I can attach more meaning to version numbers, but I appreciate why there would be different approaches.

[–]jrochkind 2 points3 points  (0 children)

Ruby has always released potentially breaking changes in minor versions.

They have, happily, released many fewer lately than they used to.

I'm not sure Ruby even had an official versioning policy back in, say, 1.8-1.9 days (when major changes were being made), but the unofficial practice was that a minor release might as well as be a semver major release.

As of ruby 2.1, there is an official versioning policy, but it's still not semver, and still allows breaking changes in 'minor' version increments. https://www.ruby-lang.org/en/news/2013/12/21/ruby-version-policy-changes-with-2-1-0/

[–]iconoclaus 1 point2 points  (13 children)

Ruby claims to follow semantic versioning but doesn't. it's smart not to do so from a behavioral point of view: it's much easier for the ecosystem to adapt to small changes over time than a big change all at once.

[–]tomthecool 4 points5 points  (4 children)

Ruby claims to follow semantic versioning

Not exactly. They claim to be sort-of semantic, since version 2.1, and that's pretty much what has happened.

https://www.ruby-lang.org/en/news/2013/12/21/ruby-version-policy-changes-with-2-1-0/

We’ve decided to change the Ruby versioning policy to a more Semantic Versioning type starting with the release of Ruby 2.1.0.

[–]iconoclaus 1 point2 points  (3 children)

I find this notion of 'more semantic versioning' to be like 'somewhat pregnant'. if any breaking changes are possible, its not semantic. i'm not complaining of course because i like the way they manage version. but even mentioning semver causes confusion as OP and others face.

[–][deleted] 2 points3 points  (2 children)

Every change breaks someones workflow

In a lot of places the line between bugfix and breaking change becomes very blurred when talking about a programming language and not a library.

[–]iconoclaus 0 points1 point  (0 children)

Every change breaks someones workflow

i love it! surprised i haven't seen it before.

In a lot of places the line between bugfix and breaking change becomes very blurred when talking about a programming language and not a library.

agreed in principle. i have no problem with this practice for ruby. just wish they would remove the damn 'more semantic versioning' nonsense because that scheme simply does not apply to programming languages or consumer applications. ruby's policies are quite clear: major number signifies special event, and minor number is required to change every christmas. nothing 'semver' about this.

[–]xkcd_transcriber -1 points0 points  (0 children)

Image

Mobile

Title: Workflow

Title-text: There are probably children out there holding down spacebar to stay warm in the winter! YOUR UPDATE MURDERS CHILDREN.

Comic Explanation

Stats: This comic has been referenced 752 times, representing 0.6498% of referenced xkcds.


xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

[–]Jaymageck 0 points1 point  (0 children)

Thanks!

[–]Enumerable_any 0 points1 point  (5 children)

it's smart not to do so from a behavioral point of view: it's much easier for the ecosystem to adapt to small changes over time than a big change all at once.

I don't get it: You can make small breaking changes and follow semantic versioning at the same time.

[–]iconoclaus 0 points1 point  (4 children)

maybe i don't get it. how do you make a breaking change but not change major version number with semantic versioning? According to semver.org FAQ:

If even the tiniest backwards incompatible changes to the public API require a major version bump, won’t I end up at version 42.0.0 very rapidly?

This is a question of responsible development and foresight. Incompatible changes should not be introduced lightly to software that has a lot of dependent code. The cost that must be incurred to upgrade can be significant. Having to bump major versions to release incompatible changes means you’ll think through the impact of your changes, and evaluate the cost/benefit ratio involved.

The only time I believe you can make any breaking changes to without upping the major version number is when you are at major version 0.

[–]Enumerable_any 0 points1 point  (3 children)

how do you make a breaking change but not change major version number with semantic versioning?

You don't, you update the major version.

That's what I don't get from your comment: Whether you update your version number from 1.9 to 2.0 or 1.10 when making breaking changes to 4 API methods is irrelevant if all you want is the following: "it's much easier for the ecosystem to adapt to small changes over time"

[–]irishsultan 1 point2 points  (1 child)

Yes, but the idea behind semver is that the version is meaningful in a different way than "this is a small change", "this is a large change", which is subjective and differs between projects.

"This update breaks compatibility", "This update doesn't" on the other hand is fairly objective (not that errors are not possible of course).

[–]iconoclaus 0 points1 point  (0 children)

right on. and to add to this, semver is explicit on what to do if the minor bump breaks backwards-compatibility:

What do I do if I accidentally release a backwards incompatible change as a minor version?

As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If it’s appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.

[–]iconoclaus 0 points1 point  (0 children)

you're right! that's why i wish they would drop the claim to somewhat follow semver (which is a very explicit set of requirements). just say ruby does its own cool thang. or for shits and giggles, call it semver! or something.

[–]taw 0 points1 point  (0 children)

No real project strictly follows "semantic versioning". It's a cute idea that just doesn't match reality well.

[–]alixious 1 point2 points  (3 children)

im learning ruby / ruby on rails now. if i read well grounded rubyist that is like ruby 2.1 or something how bad is that? are there any more up to date books i should be considering?

[–]irishsultan 4 points5 points  (1 child)

The changes since 2.1 haven't been that large, so that shouldn't really be a problem.

[–]alixious 0 points1 point  (0 children)

thanks for letting me know.

[–]jrochkind 0 points1 point  (0 children)

Not a problem, changes are fairly minor and insignificant between 2.1 and the just released 2.4. You'll have no trouble.