Not sure but I'm trying to code haskell and im pretty sure I'm stuck on the lack of dependent types 😭 is there always a way to get around it or no?
Conversation
Yeah, I have this from time to time in Rust and usually the best solution is to admit defeat and use runtime errors. If you attempt to go too far beyond what the type system was designed to handle (outside of small scale experiments) it can come back to bite you… 😔
1
1
Biting you might look like:
- poor error messages
- confusing APIs
- hard to follow docs
- poor compiler performance
- bloated generated code (in the case of Rust)
- getting tied in knots and finding something you can't express no matter how hard you try
Haskell might fare a bit better than Rust here, and is getting better at it, but languages designed from the ground up to support dependent types can do a bit better at the dependent stuff, at the expense of other things (like compiling to efficient code).


