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
4. Again, no more monadic bullshit. ANF, gone. CPS, gone. Everything in direct style. I know where to find call/cc when I need it. 5. No more painfully converting from one monad (or absence thereof) to another. No more reinventing or failing to reinvent monad transformers.
1 reply 1 retweet 5 likes -
Replying to @Ngnghm @dyokomizo
6. No more packing and unpacking state in reader monads. Parameters provide a MODULAR way to handle dynamic scoping. 7. STATE IS MODULARITY. TO HELL WITH CONTAGIOUS NON-MODULAR EXPLICIT STATE-PASSING IN A MORONIC PRETENSE OF PURITY.
2 replies 2 retweets 4 likes -
Replying to @Ngnghm @dyokomizo
8. No more bullshit with 10000 kinds of integer and other numeric types that you constantly convert between. Just use numbers with the operations you need.
2 replies 0 retweets 5 likes -
Replying to @Ngnghm @dyokomizo
9. The OCaml ecosystem is a disaster zone with no solution in sight except maybe embrace JaneSt as your savior, if you can tolerate their style. Gerbil Scheme has a smaller community, but people *talk to each other*, synchronize, and offer all the essentials in one place.
1 reply 0 retweets 3 likes -
Replying to @Ngnghm @dyokomizo
10. OCaml modules lack good recursion or fixpoints and require a whole lot of scaffolding. OCaml objects are limited and unwieldy and don't compose well with modules. I can do so much more in Gerbil Scheme with either its builtin objects or my own Prototypes.
1 reply 0 retweets 1 like -
Replying to @Ngnghm @dyokomizo
11. Of course, typed functional programmers like to boast at how good typed fp is at writing compilers and making everything composable, but their metaprogramming tools utterly suck and are completely non-composable. Liars, hypocrites or just morons?
3 replies 0 retweets 1 like -
Replying to @Ngnghm @dyokomizo
12. Sure, OCaml has a super fast compiler, whereas Gerbil Scheme's is dog slow (it calls GCC). But guess what? With Gerbil I can do all that work incrementally at the REPL without having to recompile from scratch every time because a type has changed, thus losing all debug state.
2 replies 0 retweets 3 likes
13. Interactive state? Oops, all objects are opaque by default. That all makes debugging all the harder, and/or forces yet more boilerplate on you for string converters. 14. Parametricity is way cool, but makes data even more opaque, and then you need to break it for debugging.
-
-
Replying to @Ngnghm @dyokomizo
15. Configuration files? User specified computations? In OCaml you'll soon reinvent your own crappy evaluators. All the advantages of static typing vanish, and all your tooling. Or you reinvent the world, badly. Meanwhile your users must use a crappy language.
2 replies 1 retweet 1 like -
Replying to @Ngnghm @dyokomizo
16. GADTs... very cool, but not very usable: too powerful for a lot of the tooling to work, yet too weak to express the things you really want to say.
2 replies 0 retweets 4 likes - 10 more replies
New conversation -
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!