News for hackers. Stuff that matters.
Re:How (not) to write Factorial in Java by brlewis on Wednesday January 26, 2011 @11:09AM (#2143680)
When I write a simple function in Scheme and find myself wondering whether I might later want to swap in a different algorithm at runtime, I don't start making a pluggable architecture right then. Because I don't need to. The function I wrote can simply drop into whatever pluggable architecture I write later.

In Java, if I think I might need a pluggable architecture later, I'm tempted to go ahead and make it from the start, since my object model will need to support it.

Re:How (not) to write Factorial in Java by cynicalkane on Wednesday January 26, 2011 @12:29PM (#2144006)
Yes, this. I think people are missing, or not remembering, that Java makes you code defensively where other languages don't, and the appeal of falling into these patterns just to make sure all bases are covered without having to think too hard.
Re:How (not) to write Factorial in Java by rokekr on Wednesday January 26, 2011 @12:32PM (#2144018)
Anonymous subroutines serve a similar purpose in Perl, and are awesome for it.