[Haskell-cafe] Wow Monads!
migmit at gmail.com
Wed Apr 19 07:06:09 UTC 2017
Of course not. If my language needs much tweaking to fit the problem domain, it usually means I chose the wrong language in the first place. If macros a needed to prevent TYPOS, it means the language is doomed.
Az iPademről küldve
2017. ápr. 19. dátummal, 8:52 időpontban David McClain <dbm at refined-audiometrics.com> írta:
>> On Apr 18, 2017, at 22:05, MigMit <migmit at gmail.com> wrote:
>> I think the problem with macros in general is that their semantics is defined purely in terms of code they generate. Not in terms of what that code actually does. As for me, I want to think about the things I need to achieve, not about the code to write.
> Those first two sentences were a joke, eh? Macros exist to shape the language to suit the problem domain and prevent massive typos and fingers cramping up.
> I played around with Sanitary Macrology, or whatever they are called, in Dylan back in the late 90’s. Frankly, I find them maddening. I much prefer the Common Lisp style of macrology. But read up on macros in Quiennec’s book, “Lisp in Small Pieces”. They exist in a kind of no-man’s land in language stages. There really isn’t any one best kind of macrology.
> Back in OCaml land they used to have a preprocessor that could give you access to the AST’s from a first pass of compiling, and I made liberal use of a custom tree rewriter in order to give my vectorized / overloaded math language NML a better shape than plain OCaml syntax. That is yet another kind of macrology. And potentially just as powerful, if less convenient to use on the fly.
> - DM
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe