What should I use for binary ports in scheme?
(scheme base), (ice-9 binary-ports) or something else?
The same question about (rnrs conditions) and (ice-9 exceptions).
What should I use for binary ports in scheme? (scheme base), (ice-9 binary-ports) or something else? The same question about (rnrs conditions) and (ice-9 exceptions). 8 comments
@abcdw u should use rnrs io pots and (ice-9 exceptions), sorry if that was unclear. fwiw the various port implementations are all compatible so its not a big mess if you decide to change later. @abcdw tbh I'm just not as familiar with R7RS, and I believe it isn't as fully featured, but I'm being presumptuous here. I went with (scheme base) aka r7rs for binary port and (ice-9 exceptions) aka guile exceptions, but this fragmentation of ecosystem is not cool at all and raises learning curve to the sky. https://git.sr.ht/~abcdw/guile-nrepl/commit/fc2559710ce489d1e5922c6c5916675d67ee15bd @abcdw I would avoid R7 modules, precisely to avoid adding to the confusion. If you’re aiming for a widely understood dialect, you can pick SRFIs when they exist and provide the right feature set. SRFI-34/35 for example are mostly equivalent to Guile 3.0’s exceptions, but they’re closer to the “lingua franca” of Scheme, having been around for ages. @abcdw My personal preference: (ice-9 binary-ports) if you’re writing Guile-only code, or (rnrs io ports) if you’re aiming for R6 portability. These interfaces are roughly synonyms; the R6 one just pulls in more stuff. (I’m skeptical of R7, I think it didn’t start on the right foot.) |
@abcdw for ports in general I use (rnrs io ports), but with exceptions you get the weird the r6rs error messages, which while fine on their own & r6rs providing the superior conditional system, they are disjoint from Guile's style which feels a little clunky