Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 1998 10:45:31 -0500 (CDT)
From:      Joel Ray Holveck <joelh@gnu.org>
To:        bakul@torrentnet.com
Cc:        dchapes@ddm.on.ca, rminnich@Sarnoff.COM, hackers@FreeBSD.ORG
Subject:   Re: Improvemnet of ln(1).
Message-ID:  <199807111545.KAA13645@detlev.UUCP>
In-Reply-To: <199807111442.KAA19474@chai.torrentnet.com> (message from Bakul Shah on Sat, 11 Jul 1998 10:42:03 -0400)
References:   <199807111442.KAA19474@chai.torrentnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>> Bottom line: Warnings are good program design.  Requiring extra work
>> to issue them-- particularly when they're most frequently required in
>> interactive use-- is not.
> For interactive use, alias ln to `ln -w' to warn you.  If you
> change the default behavior of ln, you *will* break scripts.
> Unlike editors, ln is more likely to be used in scripts than
> interactively (well, it is so for most people).
> Bottom line: backward compatibility is a good program design.

How on earth will issuing a diagnostic break scripts?

>> One of my very favorite badges says, "Unix doesn't keep you from doing
>> stupid things because that would keep you from doing clever things."
>> That's still true.  But I still like to know that I'm doing something
>> stupid, just in case I'm not particularly clever at the moment.
> Adding such band-aids and making them the default *does* make
> it harder to do clever things (such as write scripts).

How on earth will issuing a diagnostic make it harder to write
scripts?

I have no descire whatsoever to break existing scripts, and I
especially have no desire to break scripts written to go between
several Unixes.  But I don't see how adding a diagnostic will break
anything.

There seems to be a perception that I am proposing (actually, I
believe rminnich proposed; I'm just arguing for) changing the
practical behavior of ln.  That would be a considerable lose.  The
only behavior I am proposing changing is what is output to stderr.

I'm *not* talking about a prompt a la cp -i.  I'm *not* talking about
a failure a la trying to symlink over an existing file.  I'm talking
about a diagnostic.

>From my first post:
> # cd /usr
> # ln -s src/sys /sys
> ln: warning: src/sys does not exist relative to /.
> # rm /sys
> # ln -s usr/src/sys /sys

Note that ln made the symlink anyway, without asking for
confirmation.

Happy hacking,
joelh

-- 
Joel Ray Holveck - joelh@gnu.org - http://www.wp.com/piquan
   Fourth law of programming:
   Anything that can go wrong wi
sendmail: segmentation violation - core dumped

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807111545.KAA13645>