1
Constraints in Go
Freedom is nothing without constraints, and Go’s generics gives us a powerful way to build polymorphic types and functions constrained by type sets . Let’s geek out.
Friendly, professional Go & Rust training
Visit bitfieldconsulting.com → RSS feedOn Hacker News Aug 2021 – Nov 2024
Software Engineering 7Career & Management 5Tools & Productivity 2Programming Languages 2Life, Learning & Writing 1Infrastructure & DevOps 1
Freedom is nothing without constraints, and Go’s generics gives us a powerful way to build polymorphic types and functions constrained by type sets . Let’s geek out.
Iterators in Go are a neat way to write “lazy loops”, where we never generate more results than we actually use. Let’s see what that would look like in Go programs, and what new facilities it gives us in the standard library.