4 ms·
I think the problem with this sort of thing is it doesn't capture the beauty and elegance of either Haskell or physics. Take the first line data Vec = Vec {
by swatow 12y ago
I think the problem with this sort of thing is it doesn't capture the beauty and elegance of either Haskell or physics. Take the first line
data Vec = Vec { xComp :: Double
, yComp :: Double
, zComp :: Double }
The author has just defined a 3d vector. But there is no "3" in the above because Vec is hardcoded to be three dimensional. The physics student is probably interested in what aspects of physics are special to 3 dimensions, and which generalize to higher dimensions. I think geometric/Clifford algebra somewhat answers this, but my knowledge is limited. Anyway, functional programming is still at the stage when the things that it can express about mathematics, are actually pretty obvious already. I have high hopes for the future (e.g HoTT), but for now functional programming is much more exciting for programmers than physicists or mathematicians (who aren't logicians or category theorists).