News for hackers. Stuff that matters.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by hota_mazi on Saturday October 19, 2019 @03:59PM (#21300444)
> As for higher order functions you would write a function that does the 90% and accepts a function parameter for the other 10%.

Surely you see how this doesn't scale, right?

You would need to first write your code, then abstract every single piece of it as a call to a function passed in parameters. Now your function is accepting five different functions in parameters, and calls them.

This is a terrible and impossible to scale way to emulate class specialization.

Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by tome on Sunday October 20, 2019 @05:39AM (#21303133)
So put those parameters in a single record type and just override the 10% of them that you need to.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by kragen on Sunday October 20, 2019 @12:19PM (#21305066)
Abadi and Cardelli identified some ways that this solution falls short—in particular, the self parameter isn't covariant—and how to fix them.