Porting some code from OCaml to Scheme, the amount of boilerplate that goes away is staggering. Of course, I am also losing a whole lot of safety and refactoring help. But this sure makes the cost visible.
-
-
Replying to @Ngnghm
Could you breakdown the types of boilerplate you're finding? IME most of it is from having generic (Hinze style) ways of handling datatypes instead of specific ones.
1 reply 0 retweets 2 likes -
Replying to @dyokomizo
1. Gambit Scheme ports are so much nicer than the disparate and underpowered OCaml channels and buffers. 2. Type-descriptors and macros are so much nicer at generating I/O handlers than either manual typed combinators or ppx transformers. 3. All the monad cruft, gone.
2 replies 1 retweet 8 likes -
Replying to @Ngnghm @dyokomizo
I'm curious why monads are such a big part of the code. In my experience, the fact that OCaml is not pure means you don't have to use monads. And without typeclasses and syntactic support monads are awkward, so most of the codebases I've seen don't treat effects monadically.
1 reply 0 retweets 1 like -
Replying to @stephenmagill @dyokomizo
I was using monads a lot for Async work. I was also using the Error monad to propagate errors, the State monad to handle an actor's state. And I was planning on using the Reader monad to pass around configuration and database or server connections.
1 reply 0 retweets 0 likes -
Replying to @Ngnghm @stephenmagill
Monads as a gateway drug for even more monads. Monads not even once :)
1 reply 0 retweets 1 like
I being able to type restrictions on my code, but I'm much happier in direct style.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Read my blog!