Comment by cv5005
7 days ago
Not a fan of methods.
Why should the first argument be so special? And how do you decide which struct should get method if you have a function that operates on two different types?
7 days ago
Not a fan of methods.
Why should the first argument be so special? And how do you decide which struct should get method if you have a function that operates on two different types?
Any parameter list is permutation invariant. the first argument is special because methods are members of classes and thus get private access in the body of the method. If the implementation of the method is improved with private access then make a design decision.
You don't have to decide where to put the implementation if you dont want to, its just a type of inlining
vs
The first argument isn't special, though:
...and so on. You could even specialize on everything but the first argument.