by chriswarbo · 10y ago · 0 comments
- A "real" programming language (Scheme)
- Only 1 character to avoid/escape (~)
- Expression-oriented (as opposed to, for example, impure echo/print)
- Completely orthogonal/independent of the code being manipulated (unlike the myriad Java/JVM examples cited by other comments)
One thing that would be nice is to distinguish between pure expressions and impure ones. That way, pure expressions can always be processed automatically (e.g. in wrapper scripts around tools like static analysers) since they're incapable of performing any effects.
Impure expressions would still be useful, e.g. to scan filenames in the current directory, but can be identified as such and skipped by tools/scripts.
The problem is that impure code can do dangerous things (depending on which i/o primitives are provided). For example, a macro might create and delete a bunch of temporary files; this might work fine in one scenario (e.g. during compilation) but misbehave during another (e.g. static analysis).
In which case "static analysis" would no longer be static.