Skip to content

The purported benefits of effect systems

typesanitizer.com
26 pointsSchwKatze3 comments
On HN

Comments

I think this discussion dismisses the "physics" of writing code, which rewards laziness.

Effects make _the right thing to do_ (proper sandboxing, testability, assertions, ...) the _easiest_ thing to do.

Build scripts aren't sandboxed because sandboxing bash functions is nigh impossible -- not because people don't want to.

The discussion on assertions is especially confusing, because that is exactly what effect systems excel at. The effect of an assertion would be Assert, and you can choose to handle it however you want, at a higher level. If you want to crash, handle Assert in main by Exit(1)ing. If you want to reject the request but keep the server alive, handle by SetResponse(500)!; CloseRequest()!. If you want to ignore it and trundle on, return to the point of the assertions continuation.

do either of these people know anything about effect systems? can’t say it feels that way…

Slop?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.