Re:Learn Physics with Functional Programming
by acchow on Tuesday September 05, 2023 @04:33PM
(#37397327)
> the language itself is not that complicated
I find Haskell quite complicated, involving abstract concepts you would likely not consciously encounter in other languages (lenses, monad transformers, free monads, etc).
Re:Learn Physics with Functional Programming
by nequo on Tuesday September 05, 2023 @05:30PM
(#37398025)
Lenses and monad transformers are libraries, not part of the language. It doesn't look like the book uses them, so you don't need to understand them in order to follow it:
Re:Learn Physics with Functional Programming
by itishappy on Tuesday September 05, 2023 @09:28PM
(#37400281)
It doesn't need to be.
You can do so much with just data declarations and typeclasses.
https://www.simplehaskell.org/
(disclaimer: not a huge fan of the sight design, but I fully support the concept)
At the least, Haskell is much faster than Python, the language itself is not that complicated (learning a whole new ecosystem is a different story), FP might lend itself better to translating physics into code, and some elements of it carry over to other languages, for example, type classes and Rust’s traits.