[Top][All Lists]

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

Re: Keeping both tmpnam and tempname?

From: Philip Nienhuis
Subject: Re: Keeping both tmpnam and tempname?
Date: Wed, 08 Oct 2014 09:39:45 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1

Daniel J Sebald wrote:

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.

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.


reply via email to

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