[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with dribble
- To: firstname.lastname@example.org
- Subject: Re: Problem with dribble
- From: email@example.com
- Date: Mon, 04 Aug 1997 10:54:05 EDT
- In-reply-to: note of 04/08/97 13:41
Bruno Haible wrote:
> Btw, do you feel that the second call to (dribble "dribble.log") should
> overwrite or append to the existing file?
There are several arguments why I think that it should append the file:
1. According to CLtL, dribble should simply redirect *standard-input* and *stan
dard-output*. When you have your screen assigned to *standar-output* you simply
'append' output to the screen, but you don't clear the screen before every pri
nt. Similarly, dribble should not overwrite the previous information, but simpl
y append it.
2. It is simpler and safer to edit a dribble file and delete unwanted parts, ra
ther than trying to recover lost data because of careless re-dribbling..
3. Suppose that dribble does append the file, but you want to overwrite it:
You would do: (dribble "dribble.log")
It is relatively simple and, actually, unlikely that someone would want to dele
te the dribble file without exiting Lisp and doing sthng. with it.
Now suppose that, on the other hand, dribble overwrites the file but you want t
o append the file. Yo need to do:
(rename-file "dribble.log" <new-name>)
At this point, if you are within a program or a loop, you might need to
do some gensym'ing in order to create unique file names, and also some
checking to make sure that the <new-name> does not exist.
The conclusion is that this is much more cumbersome than the previous case, so
I would definitely vote for appending the file.