Hacker News new | ask | show | jobs
by AzzieElbab 2528 days ago
I look at oop as a DSL. A robot that has a method to raise hand is infinitely better mental model than a function from robot to new robot whose hand is raised.
2 comments

Sergey Dmitriev of JetBrains once said at a conference or interview (I forgot which) that any well designed class library is in effect an embedded DSL.

When you consider that UML tends towards object-oriented modelling of systems, it is practical to consider the methods as the action semantics of the model.

And how do you feel about a function that takes a (mutable) reference to a robot and raises its hand?