News for hackers. Stuff that matters.
Re:“Design Patterns” Aren't (2002) by BoiledCabbage on Sunday March 07, 2021 @01:28PM (#26378287)
That last thing you're looking for I believe is called dependent types.
Re:“Design Patterns” Aren't (2002) by Smaug123 on Sunday March 07, 2021 @01:55PM (#26378573)
Dependent types are one way to achieve that effect, but I think what you're actually referring to is "refinement types".
Re:“Design Patterns” Aren't (2002) by centimeter on Sunday March 07, 2021 @02:37PM (#26379003)
See LiquidHaskell for probably the most mature SMT-based refinement types implementation.