After you've done some functional programming, you start to wonder how you ever could have considered methods on a “Point” class a good idea
2
19
6
@dkrizic A class with two or three coordinates. And the kind of method I'm referring to is something like "distance"
1
@stilkov Ok, "Point" literally. A method like double d = p1.distance( p2 ); ?
1
@stilkov So what do functional languages improve in this example?
1
@dkrizic You just build a function distance(p1, p2) without feeling guilty. Not that you couldn't do that in Java, but you typically don't.
Sep 12, 2013 · 8:28 AM UTC
2
1


