Learn Physics by Programming in Haskell
Scott N. Walck (Lebanon Valley College, Annville, Pennsylvania, USA)

TL;DR
This paper proposes using Haskell programming to enhance students' understanding of physics by expressing physical concepts through functional programming, clarifying the structure of physical theories.
Contribution
It introduces a novel pedagogical approach that leverages Haskell's features to represent physics concepts, improving conceptual clarity and comprehension.
Findings
Haskell expressions clarify Newtonian mechanics structure.
Type signatures in electromagnetic theory reveal dependencies.
The method enhances understanding in a computational physics course.
Abstract
We describe a method for deepening a student's understanding of basic physics by asking the student to express physical ideas in a functional programming language. The method is implemented in a second-year course in computational physics at Lebanon Valley College. We argue that the structure of Newtonian mechanics is clarified by its expression in a language (Haskell) that supports higher-order functions, types, and type classes. In electromagnetic theory, the type signatures of functions that calculate electric and magnetic fields clearly express the functional dependency on the charge and current distributions that produce the fields. Many of the ideas in basic physics are well-captured by a type or a function.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTeaching and Learning Programming · Parallel Computing and Optimization Techniques · Computational Physics and Python Applications
