[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the benefits of immutability
Joe Marshall wrote:
> When I said `the square root function and the ToString function' I
> intended that those be the `standard' Math.sqrt and Object.toString
> operators.
Clearly, this can't be done. When I said, you can have HOFs in Java,
I did not mean that Java methods already provide this functionality.
To quote Sean O'Rourke (Thu, 14 Aug 2003 08:25:47 -0700, Message-ID:
<m2brusuupw.fsf@rh220-50.resnet.ucsd.edu>):
> But as with so many things in Java, it doesn't make things
> impossible so much as awkward, painful, and inefficient.
You can do HOFs, but it ain't pretty and you lose compile-time type
checking, not to mention a slight performance hit. Did I also mention
it wasn't pretty?