in reply to Re: Functional Programming & method rewriting
in thread Functional Programming & method rewriting
Why type more than you need to?
This philosophy is one I don't agree with, especially when developing code you are going to have to go back and tweak later. While I hate typing way too much (java boilerplate and convention is disgusting), I do type VERY VERY fast. Many of my habits are those of pseudo-defensive programming. Even when I'm not writing "throw away" code, I don't let go of those habits easily. Why? I don't write much throw away code ... I tend to work on stuff that sticks around.
For instance (and this is just me), I *always* name my subroutine parameters and never use "shift" directly. Why? I'm being defensive because I usually want named parameters later. Every time I've done a quick shift in the middle of a block of code, I've had to go back and change it later. With @args, I might want to later replace that @args with ($gorp,$slug,@args) = shift() for instance. It leaves a place in the code to do that, and I only have to edit one line to make that change.
But I think after that double closure you can grill me all you want :) It's like climbing Mt. Everest ... "Why? Because It's There".
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Functional Programming & method rewriting
by elusion (Curate) on Oct 29, 2004 at 03:16 UTC | |
by SpanishInquisition (Pilgrim) on Oct 29, 2004 at 12:50 UTC | |
by Anonymous Monk on Oct 29, 2004 at 20:24 UTC | |
by ikegami (Patriarch) on Oct 29, 2004 at 21:06 UTC |