Hacker News new | ask | show | jobs
by throwaway201103 2012 days ago
Programming is more like mathematical notation than english prose.

In mathematics we write a² + b² = c² to describe the relationship between the lengths of the sides of a right triangle. We don't write it out in english words longhand, because the notation is brief, packs a lot of meaning into a small amount of space, and lets our minds focus on larger concepts rather than parsing long phrases and keeping their meanings organized.

2 comments

>In mathematics we write a² + b² = c² to describe the relationship between the lengths of the sides of a right triangle.

Therein lies the problem. Can you explain to me the meaning of a² + b² = c² without English? Can you just write down an equation and expect me to know what you're talking about?

Can you explain to me the concept of entropy by just showing me all the equations?

Can you explain to me the meaning of your program with only one letter variable names as shown in your Pythagorean equation above?

You can't. That's why math texts consist of equations AND English, and there's no reason programming shouldn't either.

Anyway a side note, have you ever heard of literate programming?

Yeah!

Why is matematical notation full of one-letter variables?

Cool when paper and ink is expensive and you're trying to send your proof to the other mathematician, in a letter in the mail, in the 16th century, but now? Why?!