News for hackers. Stuff that matters.
Re:Why is OOP still so widely spread? by Xenograph on Tuesday September 08, 2020 @05:38PM (#24413772)
Thanks for the detailed explanation, but I realize that I was misreading the whole time and so you answered a question that I actually didn't mean to ask. Apologies.

Instead of 'private member functions' my mind read 'member functions'.

For instance, I'd love to be able to create functions that operate on a Vector3 interface type in Typescript, but don't have the clunky syntax of

> AddVec3(AddVec3(v1, ScaleVec3(v2, DotVec3(v4, v5))), v4).

Classes in Typescript solve this just fine, so that I can do

> v1.add(v2.scale(v4.dot(v5))).add(v4)

But then I lose the benefits of structural typing. I still have yet to find a nice solution here.

There are no comments on this comment yet.