haskman

u/haskman@programming.dev
3 posts · 11 comments

Recent posts

Recent comments

on choas · c/programmer_humor · 7 pts · 1y

There is only one rule. It's much easier to add new things than to change existing things

Yes, my thoughts exactly.

This problem is not solved by monads, but by higher kinded types in general in languages like Haskell. They give you a uniform way to be generic over effects like async (Async) vs sync (Identity). Both of these can be treated as (F) for all A. So a generic Into would look like the following, and no special syntax or semantics would be needed. The type system (if sound) would prevent you from misusing a trait like this.

trait Into {
   def into(self): F;
}

I’m a long time functional programming enthusiast and work with Haskell and PureScript professionally. I recently created the PureScript community on this instance and would be happy to to moderate the Haskell community as well.