Re:Why programming is a good medium for expressing poorly un...
by contravariant on Sunday January 24, 2016 @11:09AM
(#10962877)
>Even every proof can be expressed as a program, see Curry–Howard correspondence
Well, that is true, but that's still pretty far removed from any common programming language. And readability doesn't usually improve.
>For a physicist PV=nRT is concise and clear but for everyone else?
You've somewhat got a point there, physics would be a lot easier if all formulas and variables were actually defined when needed. But symbolic notation is still a necessity, simply because symbolic manipulation is really powerful, and it's a pain to have to write 'BOLTZMAN_CONSTANT' every single time, instead of just k_B.
Also, your notation might work for simple equations like the ideal gas equation, but an equation that's only slightly more complicated, the van der Waals equation, would become quite hideous:
Well, that is true, but that's still pretty far removed from any common programming language. And readability doesn't usually improve.
>For a physicist PV=nRT is concise and clear but for everyone else?
You've somewhat got a point there, physics would be a lot easier if all formulas and variables were actually defined when needed. But symbolic notation is still a necessity, simply because symbolic manipulation is really powerful, and it's a pain to have to write 'BOLTZMAN_CONSTANT' every single time, instead of just k_B.
Also, your notation might work for simple equations like the ideal gas equation, but an equation that's only slightly more complicated, the van der Waals equation, would become quite hideous:
I really wouldn't want to have to write that out several times just to do some calculations with it.