What I'd like to see in Go 2.0

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • go

    The Go programming language

  • Just adding to the discussion:

    I find this comment from Griesemer [0] on one of the github issues for enums in Golang quite insightful:

    >> [...] all the proposals on enums I've seen so far, including this one, mix way too many things together in my mind. [...] Instead, I suggest that we try to address these (the enum) properties individually. If we had a mechanism in the language for immutable values (a big "if"), and a mechanism to concisely define new values (more on that below), than an "enum" is simply a mechanism to lump together a list of values of a given type such that the compiler can do compile-time validation.

    Like with generics, I like the team's approach of taking features seriously, not adding them just because other languages have them, but actually trying to figure out a way for them to work in Go, as cleanly as possible. I think computer science, as a field, benefits from this approach.

    And I also dislike many things from Go, and I want "enums" badly too, but that's for another comment.

    [0] https://github.com/golang/go/issues/28987#issuecomment-49679...

  • go-sumtype

    A simple utility for running exhaustiveness checks on Go "sum types."

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • yaegi

    Yaegi is Another Elegant Go Interpreter

  • I would vote for go inside go as a template system. So you can effectively write go code.

    With the help of yaegi[1] a go templating engine can be build e.g here[2].

    [1]: https://github.com/traefik/yaegi

  • yaegi-template

    Discontinued Use yaegi as a template engine.

  • sqlread

    SQL Dump Parser - Query MySQL Dumps Directly without loading them into MySQL

  • > Use int-type enums with iota: no human-readable error values, no compile-time guard against illegal enum values

    Create a new int type and use that for your enums. You have to try really hard to get a bad value in that case, and if it’s an unpunished type in a different package it’s even harder.

    See:

    https://github.com/donatj/sqlread/blob/91b4f07370d12d697d18a...

  • swift-evolution

    This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.

  • Swift solved this problems with [non-exhaustive enums](https://github.com/apple/swift-evolution/blob/main/proposals...).

  • go101

    An up-to-date (unofficial) knowledge base for Go programming self learning

  • No need to invent a new keyword, it is ok to just use "const": https://github.com/go101/go101/wiki/An-immutable-value-propo...

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • enumer

    A Go tool to auto generate methods for your enums (by dmarkham)

  • go-retry

    Go library for retrying with configurable backoffs

  • I was also curious so I picked a likely-looking project on his github and indeed found an attempt to handle a channel "deterministically" at https://github.com/sethvargo/go-retry/blob/main/retry.go#L51

    Honestly the whole first select seems redundant; any code that relies on this is broken. But OK, maybe you do have some strange performance case where this matters? In that case the whole thing could be more succinctly solved by looping on `for ctx.Err() == nil` instead of infinitely.

    It also leaks the timer until it fires if the context cancels, which seems like it would be more of a practical performance problem than any overhead to the additional elect.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Go: the future encoding/json/v2 module

    2 projects | dev.to | 2 May 2024
  • Evolving the Go Standard Library with math/rand/v2

    2 projects | news.ycombinator.com | 1 May 2024
  • Microsoft Maintains Go Fork for FIPS 140-2 Support

    5 projects | news.ycombinator.com | 30 Apr 2024
  • How to use Retrieval Augmented Generation (RAG) for Go applications

    3 projects | dev.to | 28 Apr 2024
  • Building a Playful File Locker with GoFr

    4 projects | dev.to | 19 Apr 2024