3 ms·
The Racket module system, designed by Matthew Flatt, is great. But to fully appreciate it, it helps to understand syntax transformation in Racket. Once the ri
by neilv 4y ago
The Racket module system, designed by Matthew Flatt, is great.
But to fully appreciate it, it helps to understand syntax transformation in Racket. Once the rigorous phase system forces non-kludgy static rules about when things are evaluated, your syntax transformers and the code on which they depend could cause a mess of shuffling code among multiple files to solve dependency problems... until you use submodules with the small set of visibility rules, and then suddenly your whole tricky package once again fits in a single file cleanly.
I leveraged this for some of my embedded doc and test experiments, without modifying the Racket core. (I really, really like single-source-file modules that embed doc, test, and package metadata all in the same file, in logical places.)