4 ms·
Lisp shines with macros. I like to use macros to add new static checks to the code For ex I wrote about one such check here https://tech.perpetua.io/2022/01/ge
by srcreigh 4y ago
Lisp shines with macros. I like to use macros to add new static checks to the code
For ex I wrote about one such check here https://tech.perpetua.io/2022/01/generating-sqlite-bindings-with-racket-macros/ https://tech.perpetua.io/2022/01/generating-sqlite-bindings-...
This macro checks SQLite table/column references. Aka, if you try to access user_id when the table doesn’t have that column, the “user_id” text in your code will appear as a syntax error in your IDE and when you run the code.
The typed racket project is a bigger example. They added a typechecking system to the language, including a new typescript like variant.
I’m not aware of any other language where 10 lines of idiomatic code right in your codebase can add a new IDE warning.