[Tutor] RE: global vars vs. func args
Erik Price
erikprice@mac.com
Tue, 12 Mar 2002 08:25:43 -0500
Whoah -- some questions about those quotes!
On Monday, March 11, 2002, at 10:05 PM, Danny Yoo wrote:
> """If you have a procedure with ten parameters, you probably missed
> some."""
Is this sarcasm, or seriousness? I don't think I've encountered many
functions that take more than four parameters, usually three or less.
And I know I haven't written any. Is it really okay to make such a
detailed function? (I mean, "of course you can do what you want", but
is it the convention among programmers to do so? Is it "expensive"?)
> """Think of all the psychic energy expended in seeking a fundamental
> distinction between "algorithm" and "program"."""
I was wondering the very same thing. An algorithm is like a
progam-within-a-program, isn't it? I like this quote, if I'm
interpeting it correctly.
> """Interfaces keep things tidy, but don't accelerate growth: Functions
> do."""
This one is a bit beyond me. My best guess is this: whereas an
application (with an interface of some sort) is a neat way to let the
user know what they can and can't do, it is not as flexible as a
function that could accept parameters to do the same thing, since the
function could be incorporated into a greater program. This makes me
think of Unix tools, with their ability to pipe and redirect standard
input and output in a flexible way.
These are curious quotes. Thank you for posting.
Erik