Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Should I use sb-posix:getenv or sb-ext:posix-getenv ?
I notice that there is only two functions by the name of sb-ext:posix-*,
but the other one (sb-ext:posix-environ) has no sb-posix:environ
counterpart, and I'm wondering why.
Resistance is futile. You will be jazzimilated.
Scientific site: http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com
On 1 November 2010 18:12, Didier Verna <didier@...> wrote:
> Should I use sb-posix:getenv or sb-ext:posix-getenv ?
> I notice that there is only two functions by the name of sb-ext:posix-*,
> but the other one (sb-ext:posix-environ) has no sb-posix:environ
> counterpart, and I'm wondering why.
Tl;dr: there are historical reasons, not all the APIs are as clean as
they should be.
The more complete version:
My impression is that William Newman named the things in SB-EXT
POSIX-* for clarity, since they are were nominally POSIX functions,
and probably came from the UNIX package in CMUCL -- which, like
SB-UNIX today, prefixes things with UNIX-.
Conceptually, SB-UNIX is "enough of an wrapper that we can build SBCL"
-- an internal package, whereas SB-POSIX is the supported POSIX API.
SB-POSIX:ENVIRON not existing is just an oversight, I think.
Conceptually it belongs there (too).
As for SB-EXT:POSIX-*, I for one think they should lose the prefix,
since argv, getenv, and environ also exists on all manner of non-POSIX
platforms like Windows...