3 ms·
Yeah, it does kind of suck to write "generic" data structures/algorithms in. Rob Pike has a funny git commit where he implemented general map/reduce in Go using
by PopsiclePete 12y ago
Yeah, it does kind of suck to write "generic" data structures/algorithms in. Rob Pike has a funny git commit where he implemented general map/reduce in Go using reflection, immediately followed by the comment "don't do this, ever".
For some reason, the core Go team has no need to write general algorithms/data structures. They just...write the code when they need to.
It's a strange way to think about programming, but for me, it can work. You focus on the "executable", not the "library" (I know that sounds strange...)
- dottrap 12y agoThis is very much in spirit to Casey Muratori's (Handmade Hero) 'Compression Oriented Programming' http://mollyrocket.com/casey/stream_0019.html http://mollyrocket.com/casey/stream_0019.html For all the people complaining about both (the lack of) generics and high performance systems level programming, this and his allies in the video game industry such as Mike Acton (Data Oriented Design in C++) https://www.youtube.com/watch?v=rX0ItVEVjHc https://www.youtube.com/watch?v=rX0ItVEVjHc and Jonathan Blow (Ideas about a new programming language for games) https://www.youtube.com/watch?v=TH9VCN6UkyQ https://www.youtube.com/watch?v=TH9VCN6UkyQ argue that performance and the focusing on the problem you are trying to solve are intimately related. Needless levels of abstraction (particularly ones that go against the hardware) and generically trying to solve for cases you will never actually use is a waste of real performance and developer time.