by CraigJPerry · 4y ago · 0 comments
Is that accurate? I said:
>> To complicate something is to combine and intertwine it with other concerns. To fold them together is to complicate them.
The dictionary defines complicate as:
>> to make complex, intricate, involved, or difficult
With etymology:
>> complicat- folded together complicate combine, entangle. intertwine earlv 17th century
>> instead of actually giving a shit about the perspectives of those who disagree with you
Now i resent that because i took the time to try and steelman your bad argument.
>> they couldn't be without copy/pasting their implementation for every single array type you wanted to implement them for
Not true, as i said there’s always been options for this:
>> if we need them to be generic over argument types - in the absolute worst case (so not using go generate to help us here or an interface…
Behind the scenes in the compiler, the syntactic sugar of generics are ultimately performing what you would do with “go generate“.
>> in every project that wants to use them
I don’t follow, why aren’t we allowed to create a library for code reuse like https://github.com/logic-building/functional-go/blob/master/... has done for example?
I think that makes it less complex, as the developer doesn't need to think about the exact underlying type of the array when calling Take (which is irrelevant to its implementation).
No one is writing 500 lines of code - just as when you use the generics syntax you don’t write the code that is generated by the compiler in response.
You could save about 10 lines, specifically these 10:
https://github.com/logic-building/functional-go/blob/master/...
You would still need the comparable ~40 lines of “generic” code:
https://github.com/logic-building/functional-go/blob/master/...