Story Details

  • Good-bye core types; Hello Go as we know and love it

    Posted: 2025-03-26 16:18:14

    The Go blog post announces the deprecation of the go/types package's core types in favor of using standard Go types directly. This simplifies type checking and reflection by removing a separate type system representation, making code easier to understand and maintain. Instead of using types.Int, types.String, etc., developers should now use int, string, and other built-in types when working with the go/types package. This change improves the developer experience by streamlining interactions with types and aligning type checking more closely with the language itself. The blog post details how to migrate existing code to the new approach and emphasizes the benefits of this simplification for the Go ecosystem.

    Summary of Comments ( 38 )
    https://news.ycombinator.com/item?id=43483842

    Hacker News commenters largely expressed relief and approval of Go's reversion from the proposed coretypes changes. Many felt the original proposal was overly complex and solved a problem most Go developers didn't have, while introducing potential performance issues and breaking changes. Some appreciated the experiment's insights into Go's type system, but ultimately agreed the added complexity wasn't worth the purported benefits. A few commenters lamented the wasted effort and questioned the decision-making process that led to the proposal in the first place, while others pointed out that exploring such ideas, even if ultimately abandoned, is a valuable part of language development. The prevailing sentiment was satisfaction with the return to the familiar and pragmatic approach that characterizes Go.