2 ms·
I think this is an interesting and promising idea. Code that doesn't exist can't have bugs, and when you're just fooling around rather than writing production
by kragen 5y ago
I think this is an interesting and promising idea. Code that doesn't exist can't have bugs, and when you're just fooling around rather than writing production code you can just write the formulas without the explanation.
To some extent the Scheme and Haskell communities do this already, because their favored languages are compact enough to allow them to include their programs in more or less conventional math papers.
http://canonical.org/~kragen/sw/dev3/paperalgo http://canonical.org/~kragen/sw/dev3/paperalgo is a notation I developed for writing procedural programs with paper and pencil, extending mathematical notation with lightweight notation for classes, methods/functions, assignment, iteration, conditionals, and pattern matching. For many years I have used it whenever I'm writing code on paper or a whiteboard, but still find it harder to read than more traditional notations like Python and Scheme.
In addition to compact code and explanation, it's often useful to have example inputs and outputs (the way spreadsheets and Jupyter notebooks or R notebooks do), as well as proofs.