Hacker News new | ask | show | jobs
by 013a 2514 days ago
The proposed syntax feels like a caricature to me. That something like this could be easily possible:

    func (c Connection) Read(type T Writeable)(into *T) (int, error) {
This is quite securely inside shark-jumping territory.

Also; I haven't seen Rob Pike's name really anywhere in these blog posts or discussions, or on any recent Go blog entry. Is he still involved with the Go project day-to-day? I always got the impression that he was one of the bigger anti-generics voices on the team internally.

1 comments

As far as I can tell, the latest proposal draft forbids type parameterized methods. One must admit the type parameter to the receiver or define a type parameterized function. I am making no claims about your broader point, only clarifying that your example is not permitted by the proposal draft. See https://go.googlesource.com/proposal/+/4a54a00950b56dd009648...