Skip to content

Comment on Why Is Object-Oriented Programming Useful? With a Role-Playing Game Exampleparent

Comments

Rust's trait system is essentially identical to Haskell's typeclasses, and Haskell allows infix operators which work exactly like method calls, except that you don't have to put a period between the data and the function. So it seems to me that by your definition Haskell is also object oriented.

(As for my personal opinion: I think the confusion around OOP is largely a product of it not having a precise definition).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.