Hacker News new | ask | show | jobs
by sbensu 3191 days ago
From this project, I gather it wouldn't be hard to remove the need for calling `lisp!` on every form.

Then you'd have a lisp syntax on Rust that is not embedded. Is that correct?

2 comments

It would be impossible to remove the `lisp!` on every form, as you have to actually invoke the macro.

You could make a build script that would read in lisp files, and then run them through a pre-processor of sorts before compiling. That's the closest thing, and it'd still require setting up that build.rs.

> You could make a build script that would read in lisp files, and then run them through a pre-processor of sorts before compiling.

At that point, you would be better off using a Lisp implementation and its expander over a bunch of Lisp to Rust macros.

Sure. I don't suggest that this is a good idea, just that it'd be possible this way.
Just look at the progn expansion and create one like it that doesn't add the curly braces, and that ought to work I think; (perhaps call it "prog" or something).