通过Haskell编程学习物理
Learn Physics by Programming in Haskell
摘要:
我们描述了一种方法,加深学生的理解基础物理,要求学生表达物理思想的功能程序设计语言。该方法是在黎巴嫩谷学院计算物理二年级课程实施。我们认为,牛顿力学的结构是澄清其表达的语言(Haskell),支持高阶函数,类型和类型类。在电磁理论中,计算电场和磁场的函数的类型特征清楚地表达了对产生场的电荷和电流分布的函数依赖性。基础物理学中的许多概念都可以用一个类型或一个函数很好地捕捉到。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。