There is a concept called "dependent types", which is more or less this. Wikipedia has a good overview of languages with dependent types: https://en.wikipedia.org/wiki/Dependent_type#Comparison_of_languages_with_dependent_types That being said, it's pretty complex stuff.
On Thu, Mar 31, 2022 at 1:37 PM Toon Knapen <toon.kna...@gmail.com> wrote: > >> What you need is a prover that understands the facts holding up the >> callers' stack and can statically detect tautologies in the calees >> checks. Not trivial, but I believe it would be a ton of fun to write >> ;-) > > > Indeed, that is what I want to achieve. > > Are there any of these tools already? Maybe for other languages (that I > can draw inspiration from) ? > > > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/b9e2e539-f99e-4d44-9157-723cd11a0c2cn%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/b9e2e539-f99e-4d44-9157-723cd11a0c2cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfEhOz0Nu0weoSVbGBsph_0h83Ogb6R11LSjWw93HC-bVg%40mail.gmail.com.