Conversation

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?
5
15
Sometimes, with some difficulty, but often not. If you're doing something that reasonably needs them then better use a language more suited for the problem Personally I'm very happy to throw around runtime exceptions as a workaround
1
5
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
1
2