3 ms·
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
by brlewis 16y ago
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.
- cynicalkane 16y agoYes, 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.
- rokekr 16y agoAnonymous subroutines serve a similar purpose in Perl, and are awesome for it.