News for hackers. Stuff that matters.
Re:Go 1.27 Interactive Tour by yladiz on Sunday August 02, 2026 @11:05AM (#49145316)
Please. I’m sorry, but you kind of can’t avoid needing to think about types unless you use a language like JavaScript which is super loose with its type conversions, and you especially can’t avoid in a language like Go. With generics in Go you don’t even need to prefill the types like you go with a lot of other cases, so I’m dubious about the cognitive overhead.
Re:Go 1.27 Interactive Tour by kfuse on Sunday August 02, 2026 @02:07PM (#49146826)
No need to insult JavaScript. In two out of three times the "JavaScript" written will be something like:

    interface Box<T> { value: T }

    function map<T, U>(input: Box<T>, func: (value: T) => U): Box<U> {
        return { value: func(input.value) }
    }