octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keeping both tmpnam and tempname?


From: Markus
Subject: Re: Keeping both tmpnam and tempname?
Date: Sat, 11 Oct 2014 06:37:30 +0200
User-agent: Roundcube Webmail/1.0.0

Am 2014-10-08 09:39, schrieb Philip Nienhuis:
Daniel J Sebald wrote:
<snip

Now, if there are to be aliases, I'd say make it clear rather than
obfuscate. Identify they are aliases somehow that saves a lot of reading:

      Alias: tmpnam
      See also: mkstemp, tempdir, P_tmpdir, tmpfile.

"A lot of reading"?  it still fits on one line.

If you mean to say that all those functions serve largely the same
purpose but differ only in details, why not combine them into one with
a few more options than the ML equivalent? That would help clean up
more (maintenance) than straightforward aliases.

But as for the tmpnam/tempname debate. It looks like tmpnam came first
because the documentation for "tempname" refers to "see tmpfile".  I'm
assuming tmpnam and tmpfile were an original pair.  So to have
"tempname" associated with "tmpfile" as opposed to "tempfile" seems odd.

My point is rather that there is probably quite a bit of code around
having tmpnam, that needs to be changed just to clean up a bit (IMO)
of clutter w/o much maintenance overhead.

FYI,
tmpnam is used 189 times in octave itself and 29 times in forge pacakges. While tempname is used 252 times (most comments and changelog, I guess 0 times here) in octave itself and 0 times in forge packages



tempname is the ML equivalent, so I suppose it has been implemented
later for the sake of compatibility.

BTW, Octave's P_tmpdir and tempdir have about the same issue; but I
surmise these commands are used less frequently.

OK I shut up now, I've made my point.

Philip




reply via email to

[Prev in Thread] Current Thread [Next in Thread]