When I try to require both srfi 1 and srfi 26, I get an error message telling me that an identifier has already been imported from a different source
How might i get around that conflict?
@slack1 I recommend using only-in
or except-in
Thanks
I see, and require only the things you need to stop conflicts
There’s also prefix-in
. Sometimes “the name shows where it came from” can be a readability advantage — for instance in code that’s “stitching together” things from various modules/systems/components. But for these specific srfis that’s likely to be more verbose than you want.
Like I’m guessing you don’t want to write (srfi26:cut cons (+ a 1) srfi26:<>)
instead of (cut cons (+ a 1) <>)
:smile:
Oh I see, but for a utilities library that could work great
But in say a web app, requiring modules using some prefixes like db:
, auth:
, email:
or whatever might make some of the code read more clearly.
basically arbitrarily nameable imports
Yeah there’s even a require
form where you supply a function that can munge the names totally arbitrarily. ¯_(ツ)_/¯
e.g. (require (filtered-in LOLcat-ize-the-names srfi1))
that’s actually amazing lol
although I probably won’t use that power anytime soon
Oh. Ha. I didn’t even realize that LOLcat might be relevant to your interests :grin: