Something I've been wondering about with sci, would it be possible to tweak its evaluation semantics , for example to make it call by need and not call by value?
Perhaps with a hack ;)
Most likely, how complicated do you assume it would be?
I suspect it would be easier to do a program transformation to wrap everything in delays
as SCI assumes the same semantics as clojure and doesn't really try to do anything different
but having said this @mauricio.szabo has done some hacks to implement a sort-of async/await in SCI on JS
which is similar
perhaps I can find his hacks, or he can link them here
now that we have history in this slack it should be "easy" to find... let me try
https://twitter.com/mauricio_szabo/status/1426713696789794816 and then he did make it so, but I lost track where the code is...
@ben.sless yeah here it is probably: https://app.slack.com/client/T03RZGPFR/C029PTWD3HR/C03RZGPG3-1639716316.475700
https://clojurians.slack.com/archives/C029PTWD3HR/p1629218456213600
better link (slack permalinks are hard)
This is where his hack lived: https://github.com/mauricioszabo/nbb/blob/full-async/src/nbb/sync_promises.cljs
Hi there - just jumping in the conversation now. If someone is interested I can discuss my hack :)
Can it be used as a baseline to implement a partial evaluator?