43 ms·
Just because we can, doesn't mean we have to. I'd prefer to have some more brain-cache free to concentrate on the problem I'm trying to debug rather than doing
by red_admiral 3mo ago
Just because we can, doesn't mean we have to. I'd prefer to have some more brain-cache free to concentrate on the problem I'm trying to debug rather than doing type resolution in my head.
- yladiz 3mo agoPlease. 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.
- kfuse 3mo agoNo 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) } }