News for hackers. Stuff that matters.
Re:An Introduction to Type Level Programming in Haskell by Jtsummers on Friday September 10, 2021 @12:48AM (#28477919)
You can with Ada. Though not many other languages.
Re:An Introduction to Type Level Programming in Haskell by the_duke on Friday September 10, 2021 @01:31AM (#28478130)
You can do it in most languages by just using a wrapper type with fallible constructors.

A lot more awkward than dependent types, but no popular language has those.