News for hackers. Stuff that matters.
Re:Go Replaces Interface{} with 'Any' by exdsq on Tuesday December 14, 2021 @03:40PM (#29557310)
How is generics not a big enough change to warrant 2.0?

Edit: I’m impressed generics aren’t a breaking change! I thought this changed Interface{} to Any as a breaking change

Re:Go Replaces Interface{} with 'Any' by philwelch on Tuesday December 14, 2021 @03:43PM (#29557351)
In semantic versioning, going from 1.X to 2.X is only indicated when there are incompatible API changes. Adding generics doesn’t break compatibility with preexisting Go code, so it’s unnecessary to increment the major version.
Re:Go Replaces Interface{} with 'Any' by keithnz on Tuesday December 14, 2021 @04:45PM (#29558337)
Sure, but semantic versioning really is the wrong kind of versioning to use for a language. The major version should represent major language changes, not whether its a breaking change or not, semantic versioning isn't somehow magically a "good" way to version. It's useful for libraries / dependencies where you are dealing with many different libraries and just want to know you can upgrade without having to deal with breaking changes. For a language? Silliness. Your version is not really telling you the main things you care about.

It's much much more useful to the users to say, 2.0 introduced generics, it's distinct. If it's like other languages, generics changes the code people generate a lot, libraries start looking significantly different. It's very distinct, and if that is simply in version 1.18.0 or whatever, that is super bad usability from a language perspective.

Re:Go Replaces Interface{} with 'Any' by dragonwriter on Tuesday December 14, 2021 @07:40PM (#29560366)
> Sure, but semantic versioning really is the wrong kind of versioning to use for a language.

A language or API (things you program against) are pretty much the things for which SemVer makes sense.

> The major version should represent major language changes, not whether its a breaking change or not

I don’t care if changes are “major”, I care if the code I wrote for version X is expected to need modification to work correctly in version Y. SemVer gives me that, Subjective Importance Versioning does not.

Re:Go Replaces Interface{} with 'Any' by chenzhekl on Tuesday December 14, 2021 @10:29PM (#29561729)
Can't agree more. One important information that the version number gives me is that if upgrading to newer versions will break my code. SemVer gives me that.
Re:Go Replaces Interface{} with 'Any' by garmaine on Tuesday December 14, 2021 @11:12PM (#29562009)
Arguably a language should NEVER have breaking changes large enough to warrant a SemVer major version update. Rename or fork the language if you want to do that. Such major language overhauls in the past have been a huge waste of developer time as they go back to rewrite affected code.
Re:Go Replaces Interface{} with 'Any' by notfed on Tuesday December 14, 2021 @11:40PM (#29562169)
Java 10 introduced "var", which broke code with variables named "var". I'm glad they did not introduce a new language JavaWithVar.
Re:Go Replaces Interface{} with 'Any' by int_19h on Wednesday December 15, 2021 @07:07PM (#29573185)
It's not the only two choices available. C# also introduced var back in version 3 (2008), but it did it as a "contextual keyword" - meaning that it remains a valid identifier in any position where it used to be one, even to this day. Pretty much all new C# keywords since the very first version are of this nature:

https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...

Re:Go Replaces Interface{} with 'Any' by garmaine on Wednesday December 15, 2021 @12:18AM (#29562388)
That wouldn't be large enough a change to warrant a new major SemVer. I'm talking about things like python2 -> python3.
Re:Go Replaces Interface{} with 'Any' by dragonwriter on Wednesday December 15, 2021 @12:39AM (#29562494)
> That wouldn't be large enough a change to warrant a new major SemVer.

Yes, it would. Breaking is breaking.

Re:Go Replaces Interface{} with 'Any' by int_19h on Wednesday December 15, 2021 @07:16PM (#29573248)
Whether something is breaking or not is not always clear-cut. For one thing, changes can become breaking in retrospect sometimes. For example, in C#, renaming a method argument wasn't breaking until the language introduced named arguments in calls.

There are also changes which are breaking in a very non-obvious way, to put it mildly. For example, in C# again, adding any new member to a class can break existing code that happens to pass implicitly typed lambdas to overloaded methods, because overload resolution involves checking whether the lambda body is valid for a given candidate - thus, adding a member can make a lambda ambiguous. I'm not aware of anyone actually treating this as a breaking change for semver purposes, though.

Re:Go Replaces Interface{} with 'Any' by garmaine on Wednesday December 15, 2021 @12:47AM (#29562542)
Nearly every big fix in an API is technically a breaking change if you want to be pedantic. This kind of collateral damage which requires multiple points of failure doesn’t usually count as a semantic major change.
Re:Go Replaces Interface{} with 'Any' by dragonwriter on Wednesday December 15, 2021 @12:55AM (#29562593)
> Nearly every big fix in an API is technically a breaking change if you want to be pedantic.

A fix is not a breaking change in the API, because “breaking” refers to expected behavior (so, yes, code that relies on a bug can be broken by a fix; presumably, if you've coded to an observed behavior differing from the spec you are aware of having done so.)

Re:Go Replaces Interface{} with 'Any' by ithkuil on Wednesday December 15, 2021 @03:18AM (#29563279)
There is even a name for that https://www.hyrumslaw.com/

The solution clearly can't be to never ever fix bugs though.

But depending on the kind of bugs (especially when they are of the "gotcha"/"UX" kind) often it's better to just create a new API version with the corrected behaviour and keep existing software apply handle the old behaviour the best they could.

But clearly for many many other kinds of bugs (security etc) we are better served with a bug fix in the old API even if that implies a possibility for breaking somebody.

Re:Go Replaces Interface{} with 'Any' by dragonwriter on Wednesday December 15, 2021 @11:51AM (#29568449)
Heck, for some bugs its better just to update the public contract to match the bug.
Re:Go Replaces Interface{} with 'Any' by esoterae on Wednesday December 15, 2021 @02:07AM (#29562932)
I stand in awe of your patience in the face of autodefensive incomprehension.
Re:Go Replaces Interface{} with 'Any' by usrusr on Wednesday December 15, 2021 @05:52AM (#29564232)
Does an example of semver used in a non-pedantic way even exist?

The perfect simple world that a naive interpretation of semver dreams of leads to those endless streams of major.0.0 increments fueled by better safe than sorry. "You have been warned, your code might break, no promises". After all there could always be some xkcd 1172 "every change breaks someone's workflow". In an infinite universe of monkeys on typewriters someone would have set up mission critical infrastructure based on an elaborate log4jndi deploy mechanism.

On the other extreme you have something like Java that's in the process of dropping a frozen first digit ever since 1.2. Sure, this predates semver by quite some time but if we'd try to designate meaningful major.minor.patch names in hindsight we'd certainly not go exclusively by the occasional new keywords in the syntax like var but by new feature groups like generics, lambdas and the like, most of which have been introduced without invalidating any old syntax.

"We're awesome at backwards compatibility, but this change is noteworthy enough to warrant a major, better introduce some artificial incompatibility" is something that should never happen.

Re:Go Replaces Interface{} with 'Any' by halfdan on Wednesday December 15, 2021 @02:24AM (#29563014)
It's clear the py2 to py3 migration was painful but I'm curious to hear how you would apply "they should fork / rename the language" here.

To me it just feels like semantics. They said "here's a new major version of python" when they could also have said "we have forked python 2 and we're calling it python 3. We think it's better and we will probably abandon python 2 at some point".

Re:Go Replaces Interface{} with 'Any' by necovek on Wednesday December 15, 2021 @04:00AM (#29563567)
(FWIW, "semantics" would be "what it means", so I figure that's not what you wanted to say: from your example, I guess you are saying it's more that it's a different wording — syntax? — for the same meaning)

But it's about setting expectations.

The only problem I ever had with py2 to py3 migration was that it was even possible to have the same codebase run against both, when languages are incompatible to such a degree (most notably, basic type has changed). It basically forced people to make the worst use of the Python dynamic nature (as soon as the stdlib started doing that, there was no going back).

Re:Go Replaces Interface{} with 'Any' by quietbritishjim on Wednesday December 15, 2021 @04:43AM (#29563801)
Semantics refers specifically to meaning of words/language. If you say "it's only semantics" then it probably means you both understand and agree on the concepts but not the meaning of the words surrounding those concepts. That applies in this case, with the concept being breaking changes to a language along the lines of Python 2->3, and the terms being "version change" and "new language".
Re:Go Replaces Interface{} with 'Any' by necovek on Wednesday December 15, 2021 @05:30AM (#29564085)
Makes sense, thanks.
Re:Go Replaces Interface{} with 'Any' by verdverm on Wednesday December 15, 2021 @04:03AM (#29563591)
Was? It still is painful as some companies have decided to keep and support python2 for another 5+ years. I have programs which require the same dep from different pythons.

To me, Python represents how not to do language versioning.

Re:Go Replaces Interface{} with 'Any' by loo on Wednesday December 15, 2021 @12:25AM (#29562423)
python2 -> python3 was just a handful of things like that.
Re:Go Replaces Interface{} with 'Any' by robto on Tuesday December 14, 2021 @05:01PM (#29558588)
In Java people regularly refer to a particular JDK version as a Java 17 or Java 11, even though they actually refer to versions 1.17 and 1.11, respectively[0]. In Clojure land they just say 1.x, even when large new features are added.

I like this because it emphasizes the community's commitment backwards compatibility, which I greatly value. I've spent a good deal of time writing Javascript, where library developers seem to have very little respect for their users and constantly break backwards compatibility. In ecosystems like that, upgrading fills me with dread. When I see a library on version 4, I have learned to keep looking - if they weren't thoughtful enough about their API design for the first 3 major releases, I shouldn't expect it to be much better going forwards.

For an application, I'm pretty open to version numbers signifying big features - Firefox and Chrome do this, and it's helpful with marketing. But for a programming language? A programming language is a tool, and when upgrading you need to carefully read the changelog anyways. A programming language is no different from a library (in Clojure it literally is a library), and backwards compatibility is /literally/ the main thing I care about. Is my tool going to intrude on /my/ schedule, and force me to make changes /it/ wants instead of being able to spend my time making changes /I/ care about? I want to know that.

[0]This is apparently an awful example as I've just learned that Java is actually doing the major version only thing. It still sort of works because the only reason they can do that is because they Will Not Break Compatiblity.

Re:Go Replaces Interface{} with 'Any' by linkdd on Tuesday December 14, 2021 @05:08PM (#29558713)
> In Java people regularly refer to a particular JDK version as a Java 17 or Java 11, even though they actually refer to versions 1.17 and 1.8, respectively.

17 -> 1.17, 11 -> 1.8, this is bothering me way to much for no good reason.

Re:Go Replaces Interface{} with 'Any' by danudey on Tuesday December 14, 2021 @05:26PM (#29558970)
Clarification:

* Java 8 is Java 1.8.0

* Java 11 is Java 11.0.11 (at the moment)

* Java 17 is Java 17.0.1 (at the moment)

SunOS/Solaris is what I use when I want to get nerd-rage mad about minutae: https://en.wikipedia.org/wiki/Oracle_Solaris#Version_history

Re:Go Replaces Interface{} with 'Any' by post-it on Tuesday December 14, 2021 @05:29PM (#29558998)
I don't think 11 ever referred to 1.8 generally, but for the longest time the `openjdk-11-*` packages in one of the Ubuntu LTSes (18.04?) actually installed Java 8 for some reason.
Re:Go Replaces Interface{} with 'Any' by pjmlp on Wednesday December 15, 2021 @02:29AM (#29563031)
Java does break compatibility, although they strive to avoid it as much as possible.

https://docs.oracle.com/en/java/javase/17/language/java-lang...

https://docs.oracle.com/en/java/javase/17/migrate/getting-st...

The x.y versioning with y being a synonym for major version was abandonend in Java 9.

Re:Go Replaces Interface{} with 'Any' by kelnos on Tuesday December 14, 2021 @07:54PM (#29560514)
> Sure, but semantic versioning really is the wrong kind of versioning to use for a language.

I don't agree. I usually don't care so much when a particular feature was introduced into a language (and if I do, it's usually a Wikipedia search away). I mostly care whether or not code written assuming version X can be compiled with version Y of the compiler. Semantic versioning can tell me the latter. Making versioning arbitrarily depend on what someone considers a "big" feature doesn't help me.

Re:Go Replaces Interface{} with 'Any' by MereInterest on Tuesday December 14, 2021 @11:40PM (#29562173)
> I don't agree. I usually don't care so much when a particular feature was introduced into a language

I care very much when a feature was introduced into a language, because maintaining compatibility with earlier versions of the language determines what features may be used. If I'm working on a library that needs to be compatible with C++03, then that means avoiding smart pointers and rvalues. If I'm working on a library that needs to be compatible with C++11, then I need to write my own make_unique(). If I'm working on a library that needs to be compatible with C++14, then I need to avoid using structured bindings.

If a project allows breaking backwards compatibility, then SemVer is a great way to put that information front and center. If a project considers backwards compatibility to be a given, then there's no point in having a constant value hanging out in front of the version number.

> I mostly care whether or not code written assuming version X can be compiled with version Y of the compiler.

Semantic versioning can only tell that for the case where X < Y (old code on new compiler). In order to determine it for X > Y (new code on old compiler), you need to know when features were introduced.

Re:Go Replaces Interface{} with 'Any' by klabb3 on Wednesday December 15, 2021 @02:05AM (#29562922)
> In order to determine it for X > Y (new code on old compiler), you need to know when features were introduced.

I think this is a deliberate reduction of dimensionality. Go says that you don't need to worry (for long) about this case, because the toolchain must be updated regularly - and promises that it will be as pain free as possible. This simplifies for the Go team, for library authors, and library users in most cases, at the expense of maintaining a recent toolchain.

Not saying this tradeoff is for everyone, and I've never used C++ professionally so I'm probably ignorant. But are you saying it's common with production projects that use a compiler from 2003 or earlier? What's the use case?

Re:Go Replaces Interface{} with 'Any' by grumpyprole on Wednesday December 15, 2021 @02:35AM (#29563074)
> But are you saying it's common with production projects that use a compiler from 2003 or earlier? What's the use case?

Modern C++ compilers are not necessarily available on all platforms. For example, Solaris, AIX or old RedHat versions. Go doesn't have this problem yet, but it will.

Re:Go Replaces Interface{} with 'Any' by sobkas on Wednesday December 15, 2021 @08:26AM (#29565563)
> Not saying this tradeoff is for everyone, and I've never used C++ professionally so I'm probably ignorant. But are you saying it's common with production projects that use a compiler from 2003 or earlier? What's the use case?

Let's start with the fact that newer doesn't mean better. With already deployed compiler you have tested it and know that it works good enough (code it generates, bugs you have workarounds for, etc). Where with new compiler you are on step one. You must do work again.

Or vendors just support particular version they have patched.

Or you are scared of GPL3.

Re:Go Replaces Interface{} with 'Any' by MereInterest on Wednesday December 15, 2021 @09:02AM (#29566031)
> Not saying this tradeoff is for everyone, and I've never used C++ professionally so I'm probably ignorant. But are you saying it's common with production projects that use a compiler from 2003 or earlier? What's the use case?

The first difference is that there isn't just a single compiler, but rather a standard that gets implemented by different compiler vendors. It's gotten better since then, but typically it would be a while between the updated standard being released and the standard being supported by most compilers. (And even then, some compilers might not support everything in the same way. For example, two-phase lookup was added in C++03, but MSVC didn't correctly handle it until 2017 [0].)

The second difference is that the C++ compiler may be tightly coupled to the operating system, and the glibc version used by the operating system. Go avoids this by statically compiling everything, but that comes with its own mess of security problems. (e.g. When HeartBleed came out, the only update needed was for libopenssl.so. If a similar issue occurred in statically compiled code, every single executable that used the library would need to be updated.) So in many cases, in order to support an OS, you need to support the OS-provided compiler version [1].

As an example, physics labs, because that's where I have some experience. Labs tend to be pretty conservative about OS upgrades, because nobody wants to hear that the expensive equipment can't be run because somebody changes the OS. So, "Scientific Linux" is frequently used, based on RHEL, and used up until the tail end of the life-cycle. RHEL6 was in production use until Dec. of 2020, and is still in extended support. It provides gcc 4.4, which was released in 2009. Now, gcc 4.4 did support some parts of early drafts of C++11 (optimistically known at the time as C++0x), but didn't have full support due to lack of a time machine.

So when I was writing a library for use in data analysis, I needed to know the language and stdlib feature support in a compiler released a decade earlier, and typically stay within the features of the standard from almost two decades earlier.

[0] https://devblogs.microsoft.com/cppblog/two-phase-name-lookup...

[1] You can have non-OS compilers, but then you may need to recompile all of your dependencies rather using the package manager's version, keep track of separate glibc versions using RPATH or LD_LIBRARY_PATH, and make sure to distribute those alongside your library. It's not hard for a single program, but it's a big step to ask users of a library to make.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:09PM (#29561607)
You could separate the semantic version from the PR version.

The PR version doesn't even have to be numeric. You can give them proper names.

Re:Go Replaces Interface{} with 'Any' by mook on Wednesday December 15, 2021 @10:51AM (#29567646)
Didn't Java try that? I believe it was Java 1.5 that was originally marketed as Java 5.

It was confusing.

Re:Go Replaces Interface{} with 'Any' by swagonomixxx on Tuesday December 14, 2021 @11:01PM (#29561936)
Disagree with this. Most middle managers wouldn't understand the difference. One canonical version is enough, any more and there's just confusion, not enlightenment.
Re:Go Replaces Interface{} with 'Any' by eru on Thursday December 16, 2021 @04:05AM (#29576409)
Ubuntu does pretty well with their funny animal names. Nobody confuses those with the numbers.
Re:Go Replaces Interface{} with 'Any' by coldtea on Wednesday December 15, 2021 @03:47AM (#29563466)
>It's useful for libraries / dependencies where you are dealing with many different libraries and just want to know you can upgrade without having to deal with breaking changes. For a language? Silliness.

A language update comes with the most fundamental set of libraries and APIs: the standard library (doubly so in Golang, which has a lot of batteries included).

It also potentially affects the behavior (if there are breaking changes) of all other third party libs.

The "silliness" part is a non sequitur from what proceeded it (and the following arguments don't justify it either).

>Your version is not really telling you the main things you care about.

The main thing (nay, only thing) I care about (for my existing code) from a language update is whether there were breaking changes.

I could not care less to have reflected in the version number whether a big non-breaking feature was introduced.

I can read about it and adopt it (or not) whether there's a accompanying big version number change or not.

>It's much much more useful to the users to say, 2.0 introduced generics, it's distinct.

That's quite irrelevant, isn't it?

It's not useful to users that follow the language (page, forums, blogs, etc.) and would already know which release introduced generics.

And it's also not useful to new users that get started with generics from day one of their Go use either.

So who would it be useful to?

Such a use would make the version number the equivalent of a "we got big new feature for you" blog post.

Re:Go Replaces Interface{} with 'Any' by WastingMyTime89 on Tuesday December 14, 2021 @05:12PM (#29558769)
> The major version should represent major language changes, not whether its a breaking change or not

Why?

Old code still work and unless you are purposefully maintaining an old system you are expected to use the last version anyway. What does it actually change that generics were introduced in version 1.18 rather than 2.0? From now on, Go has generics. As there is no breaking change, it’s not like you had to keep using the previous version to opt out.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:10PM (#29561611)
To play devil's advocate: many people are forced by circumstances beyond their control to use various old versions, or provide libraries and want to support people who are forced to use various old versions.
Re:Go Replaces Interface{} with 'Any' by tptacek on Tuesday December 14, 2021 @06:07PM (#29559409)
They're not using 2.0 because 2.0 might have breaking changes, and they don't want to burn the version number for something that doesn't break the Go 1.0 compatibility promise. Makes sense.
Re:Go Replaces Interface{} with 'Any' by SurgeArrest on Tuesday December 14, 2021 @07:41PM (#29560371)
I thank Go team, that the major version was not increased. You can't imagine how much wider adoption of generics will be as compared if Go went to version 2.0 There are thousands of under-educated and overly-cautious software development managers who would prevent their teams from upgrading to a major version of Go until it is "proven". When it comes to developers there are two types who read changelogs and would know their tool well and take advantage of every small change in each minor version and then there are those who are there for the money, they will find out about a new feature only if manager instructs them to use it.
Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:14PM (#29561630)
> There are thousands of under-educated and overly-cautious software development managers who would prevent their teams from upgrading to a major version of Go until it is "proven".

If semantic versioning is used correctly, like here, that's actually a reasonable-ish attitude.

Re:Go Replaces Interface{} with 'Any' by 13415 on Tuesday December 14, 2021 @05:22PM (#29558913)
It makes no sense to replace a meaningful and helpful criterion - whether it breaks code or not - by some purely subjective assessment of what's a "major change." That just leads to usual version creep, from "Go 2.2" to "Go 3.0", to "Go 4.0", to (inevitable) "Go 10", "Go 11", "Go 11 Pro", "Go 11 Ultimate Edition",...
Re:Go Replaces Interface{} with 'Any' by Groxx on Tuesday December 14, 2021 @06:00PM (#29559324)
It could be worse, they could start naming these "Go WXGA+", "Go i99900kf", and "Go for Women".
Re:Go Replaces Interface{} with 'Any' by SAI_Peregrinus on Tuesday December 14, 2021 @08:58PM (#29561100)
Go 3.2 Gen 2x2!
Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:19PM (#29561666)
You joke, but using marketing version names _in addition_ to semantic versions might actually make sense.
Re:Go Replaces Interface{} with 'Any' by maximus-decimus on Tuesday December 14, 2021 @06:21PM (#29559539)
Diet Go
Re:Go Replaces Interface{} with 'Any' by chihuahua on Tuesday December 14, 2021 @10:14PM (#29561624)
New Goke
Re:Go Replaces Interface{} with 'Any' by cortesoft on Tuesday December 14, 2021 @05:22PM (#29558902)
Wait, why wouldn’t it matter for a language? I want to know if I can compile my existing project with the new version… isn’t that an important thing to know?
Re:Go Replaces Interface{} with 'Any' by MereInterest on Tuesday December 14, 2021 @11:51PM (#29562243)
Because in most languages, maintaining backwards compatibility is absolutely sacrosanct. It's not that you check the version number to know if your code will still compile. You check the name of the language to know if your code will still compile. (Yes, there are exceptions to this, but those tend to be cautionary tales. Python 3 is a better language than Python 2, but took a decade to gain adoption because it broke backwards compatibility.)

Since backwards compatibility is already a given for languages, you can then have the major version number indicate feature additions, rather than always being a constant value as semantic versioning would require.

Re:Go Replaces Interface{} with 'Any' by cortesoft on Wednesday December 15, 2021 @03:06PM (#29570937)
I dont know if backwards compatibility is absolutely sacrosanct in most languages... for C/C++, sure... but I know Rust has broken backwards compatibility before, as has Python as you mention, and Ruby, too. I don't think it is as sacrosanct as you think it is, especially for relatively new languages under heavy development.
Re:Go Replaces Interface{} with 'Any' by mpalmer on Tuesday December 14, 2021 @06:05PM (#29559385)
Sounds like you think this is some kind of "Web 2.0" situation, but that was just a marketing term.

Languages are software; they are dependencies of other software (the only unavoidable dependency!) and as such should absolutely be versioned.

Versioning isn't for marketing or providing easy ways for users to remember when features were released. It's a tool for change management. Exciting features often come with breaking changes, but not vice versa.

Re:Go Replaces Interface{} with 'Any' by wyattpeak on Tuesday December 14, 2021 @06:50PM (#29559830)
versioning != semantic versioning

Semantic versioning is an approach to versioning. It's an approach which, as GP stated, was designed specifically to help with dependency updating.

GP isn't proposing that languages shouldn't be versioned, they're saying that semantic versioning is the wrong approach to versioning for a language.

Re:Go Replaces Interface{} with 'Any' by mpalmer on Tuesday December 14, 2021 @11:06PM (#29561967)
Well I did inadvertently leave out the word semantic but it's certainly what I was describing.
Re:Go Replaces Interface{} with 'Any' by lanstin on Tuesday December 14, 2021 @04:53PM (#29558473)
Not really from my perspective. I want know if there is any reason to not upgrade due to my existing code base breaking. Extra new features I could use are not such a reason. New reserved words are such a reason. If someone is using a new feature, I can just say "make sure you have the newest version, also here's my reason for keeping close to the edge of current versions, so that you amortize the labor of keeping up to date rather than pinning and then having some big migration project in 5 years."
Re:Go Replaces Interface{} with 'Any' by pawelmurias on Tuesday December 14, 2021 @04:51PM (#29558439)
> Can upgrade without having to deal with breaking changes

This is actually very important. If something is a major change or not is pretty subjective.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:15PM (#29561638)
It is pretty subjective, but not entirely so, and I would guess there's a pretty clear consensus around whether this is a big deal or not in the community?
Re:Go Replaces Interface{} with 'Any' by nirvdrum on Tuesday December 14, 2021 @07:43PM (#29560407)
I agree. It's a bit odd that I just learned generics were added. I expect minor bumps in language versions to be uneventful. Additionally, I expect a language to essentially never introduce breaking changes, so semantic versioning isn't really telling me anything.
Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:17PM (#29561649)
> Additionally, I expect a language to essentially never introduce breaking changes, so semantic versioning isn't really telling me anything.

I'm afraid that expectation isn't entirely warranted. Especially around standard library issues.

Re:Go Replaces Interface{} with 'Any' by socialdemocrat on Tuesday December 14, 2021 @06:41PM (#29559740)
Get your point, but I kind of like it. It tells some really important info, and they are hardly alone. Python 3.x was breaking change. Until they they stayed in 2.x versioning a long time. And we will never see a Python 4.x
Re:Go Replaces Interface{} with 'Any' by throwaway19937 on Tuesday December 14, 2021 @08:44PM (#29560999)
Python also makes breaking changes in minor releases; 3.5 introduced async/await and 3.7 made them reserved keywords.
Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:16PM (#29561641)
> And we will never see a Python 4.x

Why?

Re:Go Replaces Interface{} with 'Any' by cozzyd on Tuesday December 14, 2021 @07:12PM (#29560076)
But many languages try really hard not to make breaking changes. With good reason...
Re:Go Replaces Interface{} with 'Any' by eyelidlessness on Tuesday December 14, 2021 @10:07PM (#29561589)
In my opinion, significant additive changes are addressed more poorly than any other aspect of semver, regardless of the project scope.

Additive changes can be breaking changes quite easily, as those additions are adopted within a minor version range, as automated tooling needs to distinguish their presence, as documentation fragments.

My next biggest gripe with semver—that 0.y.z has entirely different semantics from any other major version—may actually be semantically better if adopted wholesale. If your interface changes, major version bump. Else you’re fixing bugs or otherwise striving to meet extant expectations.

Re:Go Replaces Interface{} with 'Any' by maximus-decimus on Tuesday December 14, 2021 @06:20PM (#29559533)
That's just like, your opinion, man.
Re:Go Replaces Interface{} with 'Any' by jayniz on Wednesday December 15, 2021 @04:24AM (#29563702)
Mark it zero!
Re:Go Replaces Interface{} with 'Any' by giancarlostoro on Wednesday December 15, 2021 @08:22AM (#29565525)
> Sure, but semantic versioning really is the wrong kind of versioning to use for a language. The major version should represent major language changes, not whether its a breaking change or not

Major language changes almost implies breaking changes, like Python 2 to 3 was major changes that break things everything from how modules were changed, where they were, and some syntactic and fundamental changes as well.

Re:Go Replaces Interface{} with 'Any' by titzer on Wednesday December 15, 2021 @10:13AM (#29567010)
I think we should go back to years (for most software, in fact, not just languages). Languages change slowly enough (or should) that, e.g. "Ada 2021" should be unambiguous enough. For language implementation versions, then we can add semantic numbers afterwards.
Re:Go Replaces Interface{} with 'Any' by werdnapk on Wednesday December 15, 2021 @08:33AM (#29565637)
Ruby introduces new language features all the time in minor versions while maintaining backward compatibility. I can pretty much upgrade a minor Ruby version to get access to new language features without worrying about breaking anything.
Re:Go Replaces Interface{} with 'Any' by p1necone on Tuesday December 14, 2021 @07:41PM (#29560376)
I would definitely consider a language to be an API. Using semantic versioning makes perfect sense; because it communicates to consumers of the language which versions will require them to change their source code and which will not.
Re:Go Replaces Interface{} with 'Any' by cpuguy83 on Tuesday December 14, 2021 @06:08PM (#29559418)
There are already effectively 2 ways to deal with language changes:

1. Min version in go.mod 2. Add a build tag for what to do for new/old version of go (These tags are automatic, you just need to set them in the files)

Re:Go Replaces Interface{} with 'Any' by geofft on Tuesday December 14, 2021 @06:36PM (#29559681)
Semantic versioning solves one specific problem that's worth solving - whether you can (expect to) automatically upgrade. That is a problem people have with languages just as much as libraries, and it is a problem that affects both big changes and small just as much as it affects libraries. It is not the only way to solve this problem, but that problem very much needs to be addressed.

When a language adds any features, if your dependencies (whether real library dependencies or just things you're copying from Stack Overflow) start using the new features, you must upgrade to the new language version. That is an inherent usability constraint, and every time a language designer chooses to add a feature, they're making a tradeoff. But if upgrading to the new language version is trivial, then it's generally a worthwhile tradeoff.

For instance, suppose I find some code that uses Python's removeprefix() method on strings. I need to use Python 3.9 or newer to use that code. It doesn't matter that this is a very small feature.

However, I can generally expect to upgrade my Python 3.8 code to Python 3.9 without trouble. It's different from, say, code that uses Unicode strings. For that code, I need to upgrade from Python 2 to Python 3, which I can expect to cause me trouble. The version numbers communicate that. It's true that Python 3 was a "big" change - but "big" isn't really the point. The point is that I can't use Python 2 code directly with Python 3 code, but I can use Python 3.8 code directly with Python 3.9 code. There are plenty of "big" changes happening within the Python 3 series, such as async support, that were made available in a backwards-compatible manner.

As it happens, Python does not use semantic versioning. But they have a deprecation policy which requires issuing warnings for two minor releases: https://www.python.org/dev/peps/pep-0387/ It's technically possible, I think, that a change like Unicode strings could happen within the Python 3.x series, but that's okay, provided they follow the documented versioning policy. This policy addresses the same question that semantic versioning does, but it provides a different answer: you can always upgrade to one or two minor versions newer, but at that point you must stop and address deprecation warnings before upgrading further.

You are, of course, free to also have a marketing version of your project to communicate how big and exciting the changes are. Windows is a great example here: Windows 95 was 4.0 (communicating both backwards incompatibility with 3.1 and major changes) and Windows 7 was 6.1 (communicating backwards compatibility with Vista but still major changes).

Re:Go Replaces Interface{} with 'Any' by wheybags on Tuesday December 14, 2021 @07:57PM (#29560540)
Windows (and vs) version numbers are a pain in the ass though. Constantly need to check that the version you need to put in some config file actually corresponds to the version you really mean.
Re:Go Replaces Interface{} with 'Any' by geofft on Tuesday December 14, 2021 @08:03PM (#29560599)
I haven't seen anyone do a good job of it, but it seems to me that if you wanted to try, the way to do it would be to make the marketing versions and compatibility versions so different that they can't be confused (like Windows 95 or better yet XP, not Windows 7) - and then make sure that your configuration files can accept marketing versions and silently transform them to compatibility versions.
Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:21PM (#29561682)
> [...] and then make sure that your configuration files can accept marketing versions and silently transform them to compatibility versions.

Or alternatively, complain loudly.

Re:Go Replaces Interface{} with 'Any' by naikrovek on Tuesday December 14, 2021 @08:56PM (#29561085)
define a "major" language change, then. after that, get everyone to agree on that definition.

that's why semver works; the definition of major change is defined, and that's when you update the major version number.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:18PM (#29561661)
I have sympathy for your sentiment, but you don't have to come up with a proper definition nor get everyone to agree on that definition.

The Go people can just make up reasonable version numbers without having an all encompassing theory with definitions, and they only have to convince themselves, not everyone on earth.

Re:Go Replaces Interface{} with 'Any' by naikrovek on Wednesday December 15, 2021 @12:56AM (#29562600)
> The Go people can just make up reasonable version numbers without having an all encompassing theory with definitions

but "breaking change" IS the criteria for reasonable version numbers that they have chosen.

"breaking change" is easily tested and well defined.

"big change" is as far from well defined as you can get, because "big" is unquantifiable and subject to judgement and interpretation; i.e. a poor candidate for drawing boundaries.

Re:Go Replaces Interface{} with 'Any' by eru on Thursday December 16, 2021 @04:04AM (#29576407)
The Go people did something reasonable. Yes, agreed.

I'm just saying that they could have done something different, if they had wanted to, without working out a complete theory for that different thing.

Re:Go Replaces Interface{} with 'Any' by asimpletune on Wednesday December 15, 2021 @03:26AM (#29563330)
Yeah, I think you’re talking about the “vanity bit”
Re:Go Replaces Interface{} with 'Any' by DarylZero on Tuesday December 14, 2021 @08:16PM (#29560722)
I agree.

Also they may have sneaked it in because they're implicitly acknowledging fault in their previous design decision to exclude it.

Re:Go Replaces Interface{} with 'Any' by stormbrew on Tuesday December 14, 2021 @08:25PM (#29560810)
I feel like this is perhaps a bit of a gap in semver tbh. Sometimes a purely additive change can be quite major, in the sense that it shifts the thing in such a fundamental way that you are unlikely to try to interoperate between before and after, and are likely to run into trouble if you do.

Basically, if 1.18 code is extremely unlikely to work against a 1.17 compiler, because a new (technically additive) feature is pervasively threaded through new code, I feel like it's hard to describe them as part of the same epoch.

I don't write enough go to know if that's true for generics, but it seems like it could become true fairly quickly from my experience with other languages.

Re:Go Replaces Interface{} with 'Any' by latortuga on Tuesday December 14, 2021 @08:31PM (#29560873)
This seems like it would apply to literally any new feature - new code won't compile on an old compiler. It isn't the purpose of semver though, semver is trying to help you upgrade old code safely.
Re:Go Replaces Interface{} with 'Any' by stormbrew on Tuesday December 14, 2021 @10:42PM (#29561821)
I think the thing, to me, is that semver is very useful where these things are purely mechanical. This (at least usually) applies to libraries. Semver enables things like lockfiles as used by ruby bundler and later cargo and various other things. But not all systems are upgraded in mechanical ways, and not all 'breaks' are purely mechanical.

This is why you can't really use semver (usefully) for everything. What's a "breaking change" in a word processor?

Languages aren't used like word processors, but they also aren't exactly used like libraries either. People get stuck on language versions for different reasons than why they get stuck on library versions.

At any rate I think in practice I think languages that are trying to hew to semver concepts like this just wind up with a 'fake major version'. Since Rust, for eg., might never go to 2.x the 1. in front of 54 is really just academic. That's the "real" major version as far as anyone needs to know.

A lot of the arguments in this thread seem to be kinda tautological. There's no law that says they have to use semver, nor is there a law that says semver can't be imperfect. "Semver is semver because semver says so" is not a compelling argument.

Re:Go Replaces Interface{} with 'Any' by msbarnett on Tuesday December 14, 2021 @09:31PM (#29561354)
SemVer is about breaking changes to existing code when you upgrade compilers, not about making future code backwards compatible to older compilers.

Every additive language change would be a breaking change in this ReverseSemVer you’re imagining.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @10:22PM (#29561692)
Only subtractive changes and eg performance changes would not break things in the grandfather comment's scheme.
Re:Go Replaces Interface{} with 'Any' by stormbrew on Wednesday December 15, 2021 @04:06AM (#29563599)
I did not in any way shape or form "propose a scheme." I pointed out what I perceive to be a limitation in semver to describe some kinds of changes in some kinds of things in practical terms.

These replies are incredibly and bizarrely dogmatic. I never knew it'd be so hard to have a discussion about semver without people just going "semver is semver" as if that means something.

Re:Go Replaces Interface{} with 'Any' by msbarnett on Wednesday December 15, 2021 @12:03PM (#29568624)
> These replies are incredibly and bizarrely dogmatic. I never knew it'd be so hard to have a discussion about semver without people just going "semver is semver" as if that means something.

You seem to have misunderstood. We're not pointing out that "semver is semver", we're pointing out that semver as defined with respect to compilers, which is to say, the ability of existing code to run with a new version of the compiler, and what you "perceive to be a limitation in semver" are fundamentally in tension.

The only non-perf changes that would be allowed as non-breaking changes if we addressed what you perceive to be limitations in semver are precisely those changes which would be breaking in semver-as-it-exists, and those permitted in semver-as-it-exists are precisely those which you perceive as limitations.

Happy to discuss semver, but fundamentally the thing here is that what would address your perceived limitations is... the literal opposite of semver. Which is fine! But something not being its literal exact opposite isn't exactly a flaw in the thing itself; you simply want something else entirely.

Re:Go Replaces Interface{} with 'Any' by stormbrew on Wednesday December 15, 2021 @03:59PM (#29571550)
The dogmatism I'm perceiving here is at least in part that you're applying an extremely black and white approach to this. There are many possibilities between semver and "the opposite of semver", and there are options that exist along other axes from semver as well. The only way what you're saying here makes much sense to me is if you define "opposite of X" to be "anything that is not X", which is.. weird.

And again, I did not propose "the opposite of semver" or anything else. I said "some changes are poorly described by semver". It's a big leap from that to "I know exactly what you have in mind and it is every change is a major change." Which I... did not say anywhere?

Though, I do think that, as I mentioned elsewhere, this is approximately the net practical effect of using semver for things that have a principled opposition to breaking of backwards compatibility. If you never go to '2.0.0' then the '1.' part of '1.234234.0' is meaningless. Your version is just 234234.0 and you're playing the same game of pretend that '0.x' does in semver only with a bigger number. Again though, this is not me proposing that, it is me observing that the thing you're arguing against is possibly what's really happening anyways.

Re:Go Replaces Interface{} with 'Any' by msbarnett on Wednesday December 15, 2021 @04:54PM (#29572084)
My observation is merely that every additive change breaks the ability of new code to work with old compilers, and that it would be really, really weird to have a system in which you bump a major version because old code continues to work, but bump a minor when it would break or something.

If you "aren't proposing" that, then all you seem to be saying is "I think sometimes major versions should signal that they break compatibility with old code and sometimes they should signal that they maintain compatibility with old code because of some never-promised loss of reverse compatibility with new code on old compilers" which ... sounds uninteresting, unreliable, and frankly terrible from the standpoint of anyone who wants automated tooling to be able to make decisions based on signals in the version numbers (which, while not 100% reliable, is still a huge win over the old days of "versions can just be whatever, man" imo)

Re:Go Replaces Interface{} with 'Any' by naikrovek on Tuesday December 14, 2021 @08:54PM (#29561071)
doesn't matter how "big" of a change it is, it matters if it breaks anything. that's the whole point of semantic versioning.

also how is "big" even measured? meters? kilometers? it's immeasurable, which is why the rule is to update the version number based on what changes break existing code, because that can be measured

Re:Go Replaces Interface{} with 'Any' by randomswede on Thursday December 16, 2021 @10:46AM (#29579349)
Go code that requires language (or stdlib) features first present in Go v1.n will not compile with any version of Go 1.m, m <= n. There have been a few of these (modules, soft-launched in (IIRC) 1.11, there were one or a few in 1.15, now generics in 1.18).

But, the backwards compatibility guarantee is that code that worked with Go v 1.n will work with Go v 1.j, for j >= n.

Next para is based on my recollection of the discussion around generics.

Specifically for generics, any code that doesn't use generics is untouched by the presence of generics elsewhere. Code that is, in and of itself, not generic will, in most cases, being able to call functions that are declared generic without extra hassle (there are most probably a few cases where a type annotation on the function using generics would be required). Code using generic data types probably needs to type-annotate, but there may be cases where it's not necessary.

Re:Go Replaces Interface{} with 'Any' by nine_k on Wednesday December 15, 2021 @02:07AM (#29562930)
Changing the programming approach seriously should be a major version change.

A language is an interface with humans. Switching to generics is a major change in the way to think about the source code. It's not an implementation detail which is not a big deal as long as the compiler can accept earlier source syntax.

Re:Go Replaces Interface{} with 'Any' by KronisLV on Wednesday December 15, 2021 @02:25AM (#29563019)
Heh, i think that there are plenty of opinions about how software versioning should work.

Yours is a pretty good one, i think that software versions should be indicative of what it contains to the people using them, whereas some others primarily care about the compatibility with the other versions. Semantic versioning is better suited to the latter group, because it doesn't really care about what's in the software, beyond what the changes are when compared to the other versions - breaking functionality, non-breaking functionality or just fixes of some sort.

My own alternative would take a slightly different approach yet - a system that would indicate when something was released, as well as whether the release is supposed to be stable (think MySQL 5.7, but in a format like 2021-stable-1234), or something more like a rolling release/nightly build with the latest changes (in format like 2021-latest-2345), an idea that in part i shamelessly stole from the Unity game engine, Ubuntu and JetBrains IDEs, since having a glance at their versions makes it apparent what you're looking at.

I actually wrote about that idea on my blog: https://blog.kronis.dev/articles/stable-software-release-sys...

Since then, i've started using that scheme for a few internal libraries in my dayjob to see whether it will work out (where switching to something else would be a matter of updating the CI, so less than an hour), as well as some personal projects.

Of course, each versioning scheme has advantages and disadvantages.

Re:Go Replaces Interface{} with 'Any' by mseepgood on Tuesday December 14, 2021 @03:41PM (#29557332)
They are backwards compatible and don't break people's code, so it's 1.x.
Re:Go Replaces Interface{} with 'Any' by bastardoperator on Tuesday December 14, 2021 @04:06PM (#29557755)
See https://semver.org/ for more details. https://0ver.org/ is fairly popular, and I see https://calver.org/ pretty often too.
Re:Go Replaces Interface{} with 'Any' by ignoramous on Tuesday December 14, 2021 @04:15PM (#29557892)
0ver is parody, right?
Re:Go Replaces Interface{} with 'Any' by taywrobel on Tuesday December 14, 2021 @04:32PM (#29558152)
Yes - https://0ver.org/about.html

“ZeroVer is satire, please do not use it”

Re:Go Replaces Interface{} with 'Any' by mseepgood on Tuesday December 14, 2021 @05:46PM (#29559184)
But why is it satire? It makes a lot of sense for projects that don't want to commit to a stable API.
Re:Go Replaces Interface{} with 'Any' by setr on Tuesday December 14, 2021 @06:16PM (#29559494)
For projects like React Native, which claim production-ready and are presumably quite stable in practice, you’re back to version numbers being meaningless, except with the added bonus it’s not even useful for marketing..
Re:Go Replaces Interface{} with 'Any' by DarylZero on Tuesday December 14, 2021 @08:19PM (#29560746)
It's not meaningless -- the meaning is that there are bugs. That is why the version can indefinitely approach -- but never reach -- 1.
Re:Go Replaces Interface{} with 'Any' by outadoc on Wednesday December 15, 2021 @03:53AM (#29563516)
In opposition with SemVer projects, which... ...don't have bugs?
Re:Go Replaces Interface{} with 'Any' by ByteJockey on Tuesday December 14, 2021 @07:55PM (#29560521)
You make a good argument. Anything that keeps the marketers away does seem like a pretty good feature.
Re:Go Replaces Interface{} with 'Any' by spacechild1 on Tuesday December 14, 2021 @06:24PM (#29559563)
I work on Pure Data (https://github.com/pure-data/pure-data/) which has been 0.x for 25 years now :-) The upcoming release will be 0.52.
Re:Go Replaces Interface{} with 'Any' by jonathankoren on Tuesday December 14, 2021 @04:22PM (#29558004)
Well there’s a joke somewhere.

Less has my favorite version numbering system. Sequential.

Latest stable release: Version 598

https://www.greenwoodsoftware.com/less/

Re:Go Replaces Interface{} with 'Any' by meowface on Tuesday December 14, 2021 @04:52PM (#29558448)
My favorite has become just making the version number the release date.
Re:Go Replaces Interface{} with 'Any' by ViViDboarder on Tuesday December 14, 2021 @05:24PM (#29558945)
See CalVer. The date is definitely helpful for something with fairly stable APIs where breaking changes aren’t really happening.

Perfect for things like Ubuntu, pytz, and ca-certificates.

Less for something like a library who’s API could change and break your implementation.

Re:Go Replaces Interface{} with 'Any' by eru on Tuesday December 14, 2021 @11:32PM (#29562116)
CalVer is useful for Ubuntu. But not because it's stable, just the opposite:

It's useful for Ubuntu, because each Ubuntu release is a hodgepodge of lots of unrelated updates. Some will be breaking, some will be fine.

Re:Go Replaces Interface{} with 'Any' by ljm on Wednesday December 15, 2021 @05:14AM (#29563976)
Also for systems relying on continuous delivery in some form, like websites and web apps and SaaS. Because as a user you don't actually have a choice to use an update or stay on an old one.

Considering most places I've worked at just bump the minor number in perpetuity, a date-based version conveys a bit more info. Also so much easier to know when it's going out if you have a release cycle (e.g. you don't have to guess what date 3.12354.0 is going to prod, you would know it already from a version like 2021.12.25).

Re:Go Replaces Interface{} with 'Any' by abendstolz on Tuesday December 14, 2021 @06:09PM (#29559426)
For binaries, I agree. For libs, I prefer semver
Re:Go Replaces Interface{} with 'Any' by klyrs on Tuesday December 14, 2021 @09:57PM (#29561517)
Not the git hashcode?
Re:Go Replaces Interface{} with 'Any' by ljm on Wednesday December 15, 2021 @05:29AM (#29564076)
Semver and calver are sequential, so you can easily sort them and compare versions in terms of age. So you would know that jumping from 1.8 to 3.0 for example could be quite large.

You can't do the same with git commit hashes because you can't sort them based on the hash alone. I have no idea how to compare deadbeef and cafebabe without checking the code itself.

Re:Go Replaces Interface{} with 'Any' by Dylan16807 on Tuesday December 14, 2021 @05:15PM (#29558816)
"Tell the user nothing" is your favorite system?

Especially, like, what if you release a bugfix for a significantly old version? Do you give it an up-to-date number? Do you not give it a number at all?

(Also I see a 581.2 on that page.)

Re:Go Replaces Interface{} with 'Any' by jonathankoren on Tuesday December 14, 2021 @08:33PM (#29560893)
Upgrade
Re:Go Replaces Interface{} with 'Any' by Dylan16807 on Tuesday December 14, 2021 @08:56PM (#29561086)
> Upgrade

Upgrading is the problem in this scenario. Let's say 727 is the modern version. If users upgrade to 728, when 728 is based on 402, we have an issue.

Re:Go Replaces Interface{} with 'Any' by jonathankoren on Tuesday December 14, 2021 @09:50PM (#29561474)
> we have an issue.

No, we don’t.

Re:Go Replaces Interface{} with 'Any' by Dylan16807 on Tuesday December 14, 2021 @11:11PM (#29561998)
It's hard to say much when your replies are so short, but let me try to elaborate.

If a user that was happily using version 727 is now on a version that's almost identical to 402, they're now missing 300 versions' worth of code changes. You don't see how that's an issue? What if they were using functionality from that? Upgrading to 728 has removed all this code they were depending on!

If everyone follows your advice to upgrade, then everyone has this problem. Including you, unless you ignore your own advice.

Re:Go Replaces Interface{} with 'Any' by jonathankoren on Thursday December 16, 2021 @09:02PM (#29586840)
>If a user that was happily using version 727 is now on a version that's almost identical to 402

lol. That’s not how this works.

Re:Go Replaces Interface{} with 'Any' by Dylan16807 on Sunday December 19, 2021 @02:40AM (#29612167)
> lol. That’s not how this works.

If I give my bugfix to 402 a version number, it will be 728.

So if that's not what happens, what does?

Do I give it no version number?

Am I not allowed to release a bugfix?

Surely you can see why both of those options cause unnecessary problems.

If you have something else in mind, you need to say it.

Re:Go Replaces Interface{} with 'Any' by jonathankoren on Monday December 20, 2021 @02:53AM (#29622387)
Never backport fixes. Time only goes forward.
Re:Go Replaces Interface{} with 'Any' by Dylan16807 on Monday December 20, 2021 @02:24PM (#29628953)
It might not even be a backport. Either way that's a pretty rude system.

And it's not really a version numbering system that you're advocating for at that point, it's a strict rule about linear releases.

Re:Go Replaces Interface{} with 'Any' by planb on Wednesday December 15, 2021 @01:06AM (#29562653)
Was "any" a reserved word in Go before? Because if not, this would be a breaking chnage for all code that uses a var named "any".
Re:Go Replaces Interface{} with 'Any' by dharmab on Wednesday December 15, 2021 @01:27AM (#29562769)
I just tested on the dev branch and you can still use variables named `any`. The compiler is smart enough to tell variable names and types apart. You can even create a variable named any with type any with `var any any`
Re:Go Replaces Interface{} with 'Any' by mseepgood on Wednesday December 15, 2021 @02:33AM (#29563055)
"any" is a new identifier, not a keyword. The usual shadowing rules apply.
Re:Go Replaces Interface{} with 'Any' by preseinger on Tuesday December 14, 2021 @03:41PM (#29557322)
It's not a breaking change.