Hacker News new | ask | show | jobs
by kasperni 2556 days ago
So from the OOP Alternative to Utility Classes on the site

int max = new Max(10, 5).intValue();

over

int max = Math.max(10, 5)

Yeah, think I am going to pass.

1 comments

Gotta get rid of all those nasty pure functions. Can't have any of that cruft in muh object oriented language.
Constructing an immutable object/value isn't any different than a pure function that outputs that object/value. The difference is just syntax.

That said, I don't know if this library uses the practice of immutable-only objects.