Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I mean we have a paradigm, and it's basically OOP with a dash of functional programming at the functional level.

Well, but who really follows that idea? What usually happens is, that the state is stored in the object (of a class) and the result of subsequent method calls depends on previous calls and arguments, since it changed the state of the object. Maybe there are even calls to other objects in the system changing their state, and in turn changing return values of their methods.

Also: If we have actual functions (in a mathematical sense), then they depend only on their inputs / arguments. Why then have them in a class, and not in say for example, a module?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: