Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I randomly open Feynmans lectures on physics and see

E (between the sheets) = sigma/epsilon0

E (outside) = 0

assigning two different values to the variable E.

In applied math, there are many expressions in which a variable y is treated as a value (depending on implicit parameters) or as a function y(t) depending on explicit independent variables. This is a matter of convenience, not principle.



I don't understand the context of that E example so I'm not sure what it means... Is the value of E being mutated as in an algorithm, or does it just have two different values for different inputs like a function?


I can't find that at feynmanlectures.info, but I think it's describing the electric field in an idealized capacitor -- so yes, a function, as you'd expect. I don't know where the idea comes from that you write basic physics as 'twere Fortran programs.

If Feynman had used something like imperative programming in the Lectures, I wouldn't have been as baffled as (most of?) the rest of a class of physics undergraduates confronted with "LET I=I+1" in the introductory programming class. So I have some empirical evidence from the time when your first computer might be a PDP-10 down the road from Tony Hoare, that imperative programming is really unnatural for physicists.


You missed my point. Probably I expressed it poorly.


In a physics lecture, the audience is reasonably smart but slow - so you can use compact natural language flavored instructions: e.g. "as we take the limit of x to zero, expression(x) goes to c" which change values of variables. In programming, the agent being addressed is analogous to Turing's dumb schoolboy - it's very literal and needs easy to interpret instructions for each step so: c "= trytocomputelimit(f,x)". In both cases, the state of the calculating agent changes as it follows the steps of the calculation.


In defence of physicists, a few references are needed for these assertions, like them associating mathematical functions with a stateful "calculating agent".


I gave a reference to Feynman's note. The "stateful calculating agent" is the physicist or student.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: