r/ProgrammerHumor • u/NeverMakesMistkes • Jun 24 '18
JavaScript is getting real tired of your jokes
Enable HLS to view with audio, or disable this notification
12k
Upvotes
r/ProgrammerHumor • u/NeverMakesMistkes • Jun 24 '18
Enable HLS to view with audio, or disable this notification
View all comments
Show parent comment
224
u/ThrowinAwayTheDay Jun 25 '18
Basically it doesn't have generics which means you have to do a lot of fuckery with interfaces to get to a level of abstraction that you get with generics. And it's still not really possible. You end up with a lot of duplicated code for compatibility with different types.
Best example is https://golang.org/pkg/sync/atomic/ the atomic package used for asynchronous arithmetic.
You have AddInt32, AddInt64, AddUint32....