Re:Directly compiling Scheme to WebAssembly: lambdas, recurs...
by zelphirkalt on Thursday June 01, 2023 @05:42AM
(#36149091)
There are often libraries specific to the Scheme one uses, either built-in or external but easy to install. When writing code one has the choice of picking the one that is specific for the Scheme dialect, or trying to get by by using SRFIs (Scheme Request For Implementation). When using SRFIs, there is a good chance, that they are also available in another Scheme. Perhaps one has to change how things are imported a little. At least for popular SRFIs. However, often (maybe this is a requirement for a SRFI? idk) there will also be an example implementation given with the SRFI, which might allow for easy porting to the Scheme one uses.
I once ported a library I wrote in Racket from Racket to GNU Guile. Since I made use of Racket's for loop forms, I had to rewrite those parts using different constructs like named let in GNU Guile. That was most of the work. I also had to changed how it makes use of multiple cores (places -> futures), but that is to be expected, I guess.
As others have stated, it depends on the code you are porting. If you do not have many dependencies and made a choice to use mostly standard Scheme constructs, you will have not much of a problem to port it to another Scheme.
I once ported a library I wrote in Racket from Racket to GNU Guile. Since I made use of Racket's for loop forms, I had to rewrite those parts using different constructs like named let in GNU Guile. That was most of the work. I also had to changed how it makes use of multiple cores (places -> futures), but that is to be expected, I guess.
As others have stated, it depends on the code you are porting. If you do not have many dependencies and made a choice to use mostly standard Scheme constructs, you will have not much of a problem to port it to another Scheme.