news.volyx.in

Go Replaces Interface{} with 'Any' (github.com)

726 points by brosciencecode · 1740 days ago · 459 comments on HN

Article summary

The Go programming language has introduced a new type alias called 'Any' as part of its generics feature. This change is part of Go 1.18 Beta 1, which does not break backwards compatibility with previous versions. The introduction of generics is a significant change, but it does not warrant a major version bump to 2.0. The language's versioning follows semantic versioning principles, indicating that major version changes are reserved for breaking changes.

Main themes

  • Go programming language
  • generics
  • semantic versioning
  • backwards compatibility
  • language versioning
  • change management

What commenters say

  • Some argue that semantic versioning is not suitable for languages, as it prioritizes backwards compatibility over feature additions.
  • Others believe that semantic versioning is essential for languages, as it helps with change management and dependency updating.
  • The introduction of generics in Go 1.18 is seen as a significant change, but one that does not break backwards compatibility.
  • There is a debate about whether major version numbers should represent major language changes or breaking changes.
  • Some think that using marketing version names in addition to semantic versions could be beneficial.
  • Others argue that versioning is a tool for change management, not for marketing purposes.
  • It is suggested that languages should prioritize backwards compatibility, as breaking changes can have significant consequences for users.
  • There are different opinions on how to handle versioning in languages, with some advocating for a more subjective approach to major version changes.