3 ms·
> F# has a number of these specific implementations but they're kind of "hard-coded" in the language rather than fully extensible. That's not true. You can ext
by yohanatan 12y ago
> F# has a number of these specific implementations but they're kind of "hard-coded" in the language rather than fully extensible.
That's not true. You can extend the language yourself with "computation expressions" (and that's in fact how the 'async', 'let!' et al keywords are implemented).
- lmm 12y agoTrue, but what you can't do is abstract over them; you can't write a function that operates on "some generic computation expression" (you can't even write that type). So you can't write "sequence" or "traverseM" or more complicated/specific things you build on top of these.
- yohanatan 12y agoThere is an encoding supporting that level of abstraction (perhaps though not as straightforward as you'd prefer); namely using interfaces (which are first-class) to encode module signatures. See: https://gist.github.com/t0yv0/192353 https://gist.github.com/t0yv0/192353