Re: Separate high-level and low-level APIs Marc Nieper-WiÃkirchen 23 Apr 2020 15:43 UTC
Am Do., 23. Apr. 2020 um 17:38 Uhr schrieb Lassi Kortela <firstname.lastname@example.org>: [...] > I would tentatively advise against this since there would seem to be > very little difference between those low-level and high-level APIs. > > The low level is: > > - Convert Scheme strings and fixnums to C strings and integers > - Make the syscall > - C strings and integers back to Scheme strings and integers > - On error, either return errno as as fixnum or raise exception > > High level: > > - Same as low level > - Definitely raise exception on errno > - Definitely translate per-thread umasks and pathnames > - Not that many other differences? > > So they sound almost the same. And if so? This gives freedom to the Scheme world because one does not have to stick to POSIX semantics when there are better semantics and it allows access to the underlying POSIX features. If one goes through the POSIX API, are umasks and pathnames really the only things that one would handle differently on the Scheme side?