5 ms·
I wonder what is possible in more common languages like Java or Python. Certainly, the language itself won't have liquid types in the compiler any time soon. B
by mabbo 3y ago
I wonder what is possible in more common languages like Java or Python.
Certainly, the language itself won't have liquid types in the compiler any time soon. But taking Ruby's Sorbet as inspiration, I wonder if you could annotate Java classes with semantic rules and do some simple verifications as a post-compilation step?
There's too much bad code out there that can't just be replaced. Tools to help make it better would be a huge boon.
- c-cube 3y agoIn 2008 at univ I had a few classes using http://krakatoa.lri.fr/ http://krakatoa.lri.fr/. Tools definitely exist, although you could probably argue that the production ready version of that that people use in practice is really Ada/SPARK (built on similar technologies if not the same)
- sn9 3y agoJava has JML [0] and Python has all sorts of DBC libraries that can accomplish something similar [1]. [0] https://www.thestrangeloop.com/2018/contracts-for-getting-more-programs-less-wrong.html https://www.thestrangeloop.com/2018/contracts-for-getting-mo... [1] https://www.hillelwayne.com/talks/beyond-unit-tests/ https://www.hillelwayne.com/talks/beyond-unit-tests/