Re: Remove file descriptors completely from srfi-170? Marc Nieper-WiÃkirchen 11 Sep 2020 14:56 UTC
Am Fr., 11. Sept. 2020 um 16:04 Uhr schrieb <xxxxxx@ancell-ent.com>: > > I would love to see a higher-level abstraction of this SRFI before we > > talk about voting any of them into R7RS (large). For a language > > standard that should be appliable to general (hosted) systems, SRFI > > 170 looks too much tied to POSIX in some regards. And even on a POSIX > > system, a 1:1 mapping is hard to realize as the discussions have shown > > (threads are not 1:1, the errno is unreliable, the current umask and > > the current path can only be used with caveats). > > Quibble, errno can be made reliable, you just have to do the work > "under the table" at the C level, for example always immediately save > a copy after making a POSIX call, then make it available to your error > handling code if in fact an error occurred. Sure, this is possible. What I meant is that a procedure (errno) returning the current errno makes sense in a C program, but doesn't make sense in a Scheme program.