[Tutor] RE: global vars vs. func args

Kirby Urner urnerk@qwest.net
Tue, 12 Mar 2002 08:10:38 -0800


At 08:25 AM 3/12/2002 -0500, you wrote:

>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?

It's a joke.  Ten would be considered very much on the
high side, for parameters, although you can easily pass
a single list -- that contains ten (or a thousand)
elements to be modified (but probably all in the same
way).

>>"""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.

Here I think he's saying don't waste your time trying to
puzzle out a neat distinction between the two.  Life is
short.

>>"""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.

We agree on this one.  Functions package a program into
discrete units *and* promote synergy i.e. suggest ways
of reusing the same functions in new and interesting
combinations.  Interfaces (I presume he meant in the
GUI sense, not in the more arcane Java pseudo-class
sense) also help organize a program, but they tend to
impose a static, non-synergetic regime.


>These are curious quotes.  Thank you for posting.
>
>
>Erik
>

Yeah, fun.  I'm glad you chose to analyze 'em.

Kirby