Instead of "static type advocate", maybe we should call them "metaprogramming deniers". Then there are the metaprogramming deniers who don't even advocate static types. Morons.
-
Show this thread
-
I’ve been thinking about this. Except for code instrumentation and trivial boilerplate generation I’ve never missed macros. Can you come up with a problem that macros solve that isn’t solved by (maybe free monadic, but also plain old) ADT DSLs + interpreters?
2 replies 0 retweets 0 likes -
Replying to @pkamenarsky @msimoni
Interpreters? Macros are compilers. Incrementally defined. Extensible. With no syntactic overhead. But yeah, if you can use interpreters, one will suffice to solve all issues: a Lisp interpreter. (If you can't, or simply don't, your effective language isn't Turing-complete.)
1 reply 0 retweets 0 likes -
Yeah, I know what macros are :) I was asking for a concrete example when a ADT DSL wouldn’t suffice, because frankly I can’t come up with one (except for the aforementioned two cases).
3 replies 0 retweets 0 likes -
Replying to @pkamenarsky @msimoni
If you write the entirety of all DSLs and never reuse anyone else's code, if you don't mind an exponentially growing slow down factor as you layer your interpreters on top of each other, or never take advantage of your DSLs for any non-trivial program… interpreters are enough.
1 reply 0 retweets 1 like -
There *are* ways to compose DSLs, each with their set of dis/advantages, but it’s just not an easy problem to solve. Are you claiming that macros somehow magically solve that problem? If anything, they can turn into maintenance nightmare really fast.
1 reply 0 retweets 0 likes
I don't know what kind of macros you're familiar with. For the top of technology, see Racket's macros and syntax-parse. Quite incremental.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!