ego
2020-8-23 17:38:15

(my newbie opinion…)

Maybe it depends if “beginners” is intended as in “new to programming” or as in “new to Racket”

So far all my frustrations in coding in Racket (coming from Python) have been when encountering “other people’s macros” in libs etc.

I started to think that maybe learning Racket (when coming from other languages) should almost start with macros since, like monads in Haskell, they are central to the whole experience.

Adapting to s-expressions was easy, but pretty soon you run into things where the mental translation of (<function> <args ...>) doesn’t work… sometimes you encounter what looks like a function that takes a string arg, but when you try to pass an expression-returning-a-string as the arg you get a syntax error.

Now you need to know about macros.

So far I have avoided writing my own macros as I didn’t think I was doing anything that should need them, and have spent a bunch of time finding workarounds for interacting with macros from libs. But I start to feel like the spirit of Racket is maybe more like “macros all the way down” and I should stop trying to avoid them.