4 ms·
Sounds similar to Cakelisp. Has anyone tried both and is able to contrast them? The author of Cakelisp notes that Carp requires writing bindings, but Cakelisp
by schemescape 4y ago
Sounds similar to Cakelisp. Has anyone tried both and is able to contrast them?
The author of Cakelisp notes that Carp requires writing bindings, but Cakelisp apparently does not:
https://macoy.me/code/macoy/cakelisp/src/branch/master/doc/VsOtherLanguages.org https://macoy.me/code/macoy/cakelisp/src/branch/master/doc/V...
Edit: I think Cakelisp has you explicitly generate C code, and maybe Carp does it behind the scenes?
- tmtvl 4y agoThe difference as far as I can see is as follows: Cakelisp is an S-expression representation of C++, kind of like how Assembly language is a nicer representation of machine code. Carp is its own language which transpiles to C, like a bunch of other languages that get transpiled to C (e.g. Nim, Chicken Scheme,...). I suppose the main trade-off (besides Clojure syntax) is RAII and MMM versus a borrow checker, consult your nearest Rust article for much back and forth about that stuff.
- schemescape 4y agoMMM = manual memory management?
- tmtvl 4y agoYep, good old malloc and calloc (and if you absolutely undeniably have to, free)... well, or your own hand-rolled variants. Come to think of it, that could work well with S-expressions: (with-arena my-arena (let ((foo-a (allocate foo))) ;; yadda yadda yadda ))