Re:Fuchsia is not Linux
by ninkendo on Wednesday April 11, 2018 @07:03PM
(#16816581)
More evidence IMO that when people think they need template metaprogramming, what they probably really need is basic collections primitives. Go is a good example of this. (Strings, maps, lists, slices are just done once by the language, you don't get to write your own implementation because there's no generics, but in practice nobody cares.)
[ Parent
| on HN ]
> but in practice nobody cares
I haven't worked with Go personally, but "no generics" is probably the most commonly vocal complaint I hear about it, so clearly some people do care.
It's kind of a meme at this point though. Shitting on other people's favorite language is a well honored SWE tradition.
Re:Fuchsia is not Linux
by littlestymaar on Thursday April 12, 2018 @03:40AM
(#16818767)
“lol no generics” is the meme. But the lack of generics is a real problem that bothers a lot of people (and several already developed their own solution to work around this problem)
Re:Fuchsia is not Linux
by mickronome on Wednesday April 11, 2018 @08:01PM
(#16816908)
People actually do care a lot about the fact that you can't have type safe and thread safe code, or abstractions without tons of synchronization code repeated ad nauseum throughout the code.
Multiply that by 10 if you have several junior team members who have been told, and read, that concurrency and parallelism is easy in go.
"nobody" is a little strong.
Advanced users might want to use advanced data structures that are not built-in in the langage, and templates can be convenient to do that.
Have you ever wanted to call .map() on an array? Or sort with a custom comparison function?
Re:Fuchsia is not Linux
by SamReidHughes on Wednesday April 11, 2018 @09:13PM
(#16817250)
Sorting you can do -- the function takes indices. And no, I've never wanted to call .map() -- I love writing for loops over and over, it feels really productive.