Question: still no generics?

Asked By
Asked At
2018-01-20 14:07:46

Found 15 possible answers.

User Answered At Possible Answer
dlsniper 2018-01-20 14:22:28 yes, go still doesn't have generics and there is no indication that it will receive them any time soon and you can further read here: about the previous attempts and follow the discussion on them if you want generics in Go, please read about the initiative that the Go team started back in July 2017 on gathering input from Go users about how they write Go and where it could do better and so the team cannot take a decision on how that feature should look like for now people are still not writing sufficient reports to determine which kind of generics would be useful for Go applications in real-life
mertakman2012 2018-01-20 14:24:57 i am writing an interface for my code once , it gives me all the things i need for do with generics
dlsniper 2018-01-20 14:25:34 interfaces do solve a class of problems but they don't solve all problems and have their downsides as well
anlhord 2018-01-20 14:25:40 thanks a lot Florin.
dlsniper 2018-01-20 14:28:33 if you feel you have something useful / unique / new to add to the discussion, writing about this and sending a link to the Go team would help. Otherwise commenting on previous reports is also useful
anlhord 2018-01-20 14:41:02 I'm just come back to go after months. reviving my old approach to generic issue. i claim it's worse than all other approaches i've seen. just want to humbly propose it rather than doing nothing (in light of looming go 2.0)
dlsniper 2018-01-20 14:45:52 if your old approach was rejected, then it probably had some reasons. Addressing those reasons would be a good start so yes, they might not be doing something explicit about generics, but they are pretty busy preparing for them / improving our life meanwhile also generics are not the only thing that the Go team needs to spend their time and efforts on, Go 1.10 being an excellent proof of that, where the debugging experience is vastly improved, the Go build / test systems have been overhauled to further speed up compilation and gained caching, there's a new way for editors to process the output of Go test (even in parallel running mode), the test coverage works now on multiple packages out of the box (instead of using some hacks / third-party tools), there are over 350 new assembly instructions that were added to the amd64 platform (to support AVX, AVX2, SSE 1 to 4.2), and the runtime has been further improved and the GC was optimized yet again (not to mention the compiler output itself) assuming that the Go team is incapable of implementing generics in Go, or saying that they are doing nothing about it, is equally unfair and ignorant and saying that nobody is doing nothing is unfair and ignorant of the efforts that went into 4 different possible implementations so far and the learning extracted from them
anlhord 2018-01-20 14:56:28 yes I'm especially excited about inlining
mtmusic 2018-01-20 14:56:42 ?
dlsniper 2018-01-20 14:58:15 I'm sorry, I don't know about which inlining you are talking about. Could you share the CL?
anlhord 2018-01-20 14:58:58
dlsniper 2018-01-20 15:01:30 Thanks. It seems that they are still not confident enough about it but it's there if you want to play with it / report issues
ashish 2018-01-20 16:27:37 how does this work?
jbrandhorst 2018-01-20 16:44:23 you copy the 2nd and 3rd -indexed element of oddslc into evenslice, overwriting the 2 first entries
mathew 2018-01-20 16:46:53 Hi, says how to unit test your go lambda code. How can I test in manually but calling from browser or using curl and providing input?

Related Questions