▲ | instig007 4 days ago | |||||||||||||||||||||||||
> Still wish someone would figure out a working version of dependent types for real-world use, mainly so we could prove array bounds-safety without runtime checks. Hi Kenton, I'm not sure what kind of PL theory you studied in college, but "array bounds-safety without runtime checks" don't require dependent types. They are being proven with several available SMT solvers as of right now, just ask LLVM folks with their "LLVM_ENABLE_Z3_SOLVER" compiler flag, the one that people build their real-world solutions on. By the way, you don't have to say "real-world" in every comment to appeal to your google years as a token of "real-world vs the rest of you". "But my team at google wouldn't use it", or something along that line, right? https://ats-lang.sourceforge.net/DOCUMENT/INT2PROGINATS/HTML... | ||||||||||||||||||||||||||
▲ | kentonv 4 days ago | parent [-] | |||||||||||||||||||||||||
Throwing a theorem-prover at the problem, unaided by developer hints, is not realistic in a large codebase. You need annotations that let you say "this array's size is is the same as that array" or "this integer is within the bounds of that array" -- that's dependent types. | ||||||||||||||||||||||||||
|