News for hackers. Stuff that matters.
Re:Server APIs Project by chris_7 on Tuesday October 25, 2016 @05:09PM (#12791663)
Some of these comparisons aren't great. The "Variable Number Of Arguments" example is better expressed in Swift with "reduce", and it's really comparing "summing an array", the varargs aspect is a minor detail of the example. The "Idiomatic Scala" example doesn't even declare a function with varargs! (yes, it uses one, but that's not really the point)

The Swift function in the protocols example doesn't need to be generic, as the protocol doesn't have any associated types, and really ought to be a protocol extension regardless.

There are no comments on this comment yet.