Hacker News new | ask | show | jobs
by err4nt 4467 days ago
I'm beginning to believe that if code is simply a machine-interpretable codification of human expertise, then we should be able to express precisely what the code should be doing using written language as well.

I've been turning this over in my head to figure out how it should look in practice, but I'm wholeheartedly believing the following statement is true:

"All code should be composed in two languages: first in whatever programming language the task requires, and second in whatever language the programmer speaks natively."

1 comments

I guess an extension of what I mean is maybe we should write our comments in a way that a human could read a program like a set of how-to instructions, complete the same operations, and arrive at the same result interpreting your work in written language as the computer would arrive at running the code. In my way of thinking about things, code wouldn't be complete until it could be interpreted by man and machine equally.

This allows for the preservation of our human expertise by guaranteeing that any program can be translated in the future by another human reading the same written language into any other programming language (even if they can't understand your code). This could be important especially for some of the more exotic languages with sparse documentation today, imagine what it will be like trying to decipher these things in 200 years!