5 ms·
Worth reading the comments where someone points out a much simpler and more elegant solution, although it's still not an ideal situation. As noted in the post
by JamesMcMinn 9y ago
Worth reading the comments where someone points out a much simpler and more elegant solution, although it's still not an ideal situation.
As noted in the post, generics could solve this, so I'm looking forward to Go 2 if indeed generics is included. There's a few QOL issues I'd like to see addressed in 2 which would make Go a lot nicer to work with, and I say that as someone who spends most of their time working on Go codebases.
- noir-york 9y ago> Worth reading the comments where someone points out a much simpler and more elegant solution, although it's still not an ideal situation. I'm always wary of such "<language X> isn't great because..." posts as I find that the frustration is as much a function of the developer's competence, (lack of) imagination and familiarity with the language and its idioms, as it is with the language itself.
- NateDad 9y agoGenerics don't solve immutability.
- JamesMcMinn 9y agoNo, Generics make it possible to create a generic immutable data structure which can be used instead of re-writing the same boilerplate for every data type, which is the authors complaint.
- xfer 9y agoYou are still talking about immutable data structures, which has nothing to do with generics.
- JamesMcMinn 9y agoNo, YOU are still talking about immutable data structures, where as I am talking about the need to write boilerplate code in Go due to lack of Generics. The blog posts topic was not "immutable data structures", rather the need for boilerplate code in Go because of the lack of generics. The particular example was one of immutable data structures, however that was an example rather than the topic. The author themselves notes that "generics would solve all of the issues above".
- xfer 9y agoThe comment i replied to : > No, Generics make it possible to create a generic immutable data structure I am sure i can read.
- andrewjw 9y agoThat was a reply to "Generics don't solve immutability" which was a reply to a post that did not contain the word "immutable" but does contain the word "generic" James' comment you quote was responding to your comment, which he parsed generically as "Generics don't solve T", with a comment of the form, "Generics make it possible to implement a generic T." I'm confident you can read, but I'm not so sure about your reading comprehension and critical thinking.
- xfer 9y agoI'm confident that you have no clue what you are talking about.