3 ms·
> Well, all you need to do in a macro to provide error checking is to assert or raise a condition when something is wrong. That's pretty standard. Sure, but th
by lmm 11y ago
> Well, all you need to do in a macro to provide error checking is to assert or raise a condition when something is wrong. That's pretty standard.
Sure, but the conditions that lead you to do that can be arbitrary Turing-complete code. IIRC in unextended Haskell what you can do at type-level is more restricted; certainly you're guided towards a particular way of structuring your constraints. That in turn makes it more practical for other tools to support your constrained sublanguage.
I think the future of programming lies in constrained (BWIM non-Turing-complete) languages and provably correct code. I guess we'll find out.