What I Would Like to See in a Type System
loudenanalytics.comSome of what you ask for is impossible in a static type system for a Turing-complete language.
If you want it to happen at runtime, you could accomplish something almost exactly as you describe with macros in multiple mainstream languages. Or, as you alluded, just use business logic.
You'd probably enjoy a more declarative language like Haskell, honestly.
I imagined that would be the case, but don't have the CS background to prove one way or the other. I am currently learning OCaml and would love to use it more, but my job keeps me tied to R, SAS and Python.
i thought these constraints were known as dependent types?