4 ms·
Hardly pragmatic; this page seems to be little more than rah-rah Haskell evangelism. (And I like Haskell!). Making it hard to YOLO your I/O does not seem to be
by lmm 3y ago
Hardly pragmatic; this page seems to be little more than rah-rah Haskell evangelism. (And I like Haskell!).
Making it hard to YOLO your I/O does not seem to be paying off very well for Haskell; the cost in adoption often outweighs the gain in safety. Yes, Django codebases occasionally have bugs due to I/O happening at the wrong time, but that's pretty far down the list of causes of bugs in Django codebases.
Likewise the argument against macros seems to be driven by nothing more than personal taste. (And again, I dislike macros! But you have to actually make the argument why they're bad. Certainly my experience is that checking generated code into source control is worse, not better)
- dllthomas 3y agoI didn't RTFA, but I wanted to note that in Linguistics, at least, "pragmatics" isn't really about pragmatism.
- dmvdoug 3y agoIt isn’t, but the confusion is the author’s, not the commenter’s. Although the author situates the article as discussing the programming languages equivalent of pragmatics in linguistics (explicitly coupling it with syntax and semantics), the author actually focuses on practical, everyday concerns, like how programmers will steer away from using things a language makes difficult to use, or the inefficiencies resulting from bad tooling, or tedium-avoidance by programmers.
- dllthomas 3y agoFair enough.
- brabel 3y agoAbout macros: the author did argue why it's bad. It was actually the final point leading to the conclusion: salience bias: measuring what is seen and not what is unseen. And he did not say all macros are bad, giving the example of Common Lisp macros being good. Why? Because you can easily expand them (the language itself gives you the capability, not just an IDE... but of course with SLIME it's one shortcut away) and see the actual code you will get running.
- lmm 3y ago> And he did not say all macros are bad, giving the example of Common Lisp macros being good. Why? Because you can easily expand them (the language itself gives you the capability, not just an IDE... but of course with SLIME it's one shortcut away) and see the actual code you will get running. That seems pretty unconvincing. If it's important for macros, why isn't it important for regular code? And yet taking a Haskell function and dropping down to the corresponding Core is no easier than expanding a Rust or OCaml macro.
- HelloNurse 3y agoThe salience bias can be seen the opposite way: your code base consists of understandable metaprogramming based on principled tools, and the corresponding write-only generated code is unseen. The OP might have been bitten by bad macros and bad code generation (early and repeatedly).