pre-srfi / static-scheme

11 stars 0 forks source link

Native macros #14

Open mnieper opened 3 years ago

mnieper commented 3 years ago

As others have also remarked, Steme should be rich enough to work without a Scheme. There are enough examples of pure programming languages that can support a REPL, etc.

In this sense, the question of a macro system for a stand-alone Steme remains. I would say it is a secondary question because the language the macros expand to has to be fixed first. But while designing the language, we have to keep in mind that macros are able to transform forms but not arbitrary lexical elements. For example, we may or may not want that type signatures can be the product of macro expansions.

That said, standardizing ER macros for a new language that needs a new implementation anyway doesn't make much sense to me as we have better alternatives. For example, large modular macros are hard to write with ER because the expanded code becomes scoped in the lexical environment of define-syntax and not where it is actually defined.

Originally posted by @mnieper in https://github.com/pre-srfi/static-scheme/issues/6#issuecomment-723418563