[Linux-disciples] Catching URLs on the command line
Stephen R Laniel
linux-disciples@bostoncoop.net
Sat, 17 Jan 2004 12:12:55 -0500
On Sat, Jan 17, 2004 at 12:03:30PM -0500, Adam Kessel wrote:
> The difference is subject and predicate. Or something. Perl and Unix are
> both content to have sensible defaults for the *object* of a command, but
> not for the command itself. E.g., many unix tools default to stdin as
> the object (e.g., grep), or have some other sensible default behavior if
> you just run the command. When you don't give Perl any variable to
> operate on, it operates on the default variable. But there is never a
> case in Perl or Unix that I'm aware of where you give it some variable
> and it guesses what action to take on it.
Here I am just thinking out loud, but: isn't it just as
dangerous, potentially, to allow default objects as it is to
allow default verbs? Both introduce some confusion into what
might be happening at a given moment in a given program, but good
programmers learn to work around it -- actually, not just work
around it, but use it to their advantage to write shorter code.
So doesn't it seem reasonable to say that "If we run into a URL
on the command line with no verb attached to it, consult the
default action for the URL; if there's a verb, use the verb
instead"?
--
``I get the warm and fuzzies hearing about how standards-
compliant Free software rocks. I don't get them from hearing
about proprietary, non-standards-compliant software sucks.
Make me warm and fuzzy, Shlomi.''
-Peter Whysall on the linux-elitists mailing list,
http://shorl.com/banafytrarere