[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More on dispatching by function return type
John Clements wrote:
> Let me take a step back, as well, and point out that the _whole_point_
> of purely functional programming is to enable componential reasoning
> about program fragments; it's curious that Haskell, of all languages,
> would break this.
> Here's the other side of the coin, as I see it: Macros. Macros (e.g. in
> Scheme) _also_ have the "bad" property that unless I know what macros
> are present, I cannot hope to understand what a piece of code does. My
> take on this (not an original thought, of course) is that the macros are
> part of the language, and not part of the program, so the operational
> semantics for a program written in Scheme must already take into account
> the macros that are present.
As a snide aside, Haskell isn't always the easiest language to wrap your
head around. That's why its so satisfying to program in.
Using monads to hide plumbing means that you don't see the expression
you are working with at any time: you can only understand it if you have
internalized the monad's definition and are able to combine your expr-
essions on the fly. Of course, this is just higher-order programming,
so it's not impossible.
The relation to macros is that macros work on program text, rather than