Hasty Briefsbeta

Bilingual

Higher: Favourite Haskell type classes for Rust (2023)

10 months ago
  • #Type System
  • #Rust
  • #Functional Programming
  • Introduction of functor hierarchy traits in Rust inspired by PureScript and Scala's Cats.
  • Implementation challenges due to Rust's type system limitations, especially with constraints in trait implementations.
  • Use of Generic Associated Types (GATs) to approximate higher kinded types, with noted limitations.
  • Difficulty in implementing Functor for types like HashSet due to stricter bounds in implementations than in traits.
  • Complications with Bind trait implementations and the need for explicit type annotations.
  • Discussion on the limitations of GATs compared to higher kinded types and the impact on abstraction usability.
  • The crate serves as an exploration of Rust's type system capabilities rather than a practical tool.
  • Call for language improvements such as constraint kinds to better support functional programming abstractions.