7 ms·
I had the opposite reaction. I already know physics, but I want to learn Haskell.
by tobinfricke 3y ago
I had the opposite reaction. I already know physics, but I want to learn Haskell.
- daft_pink 3y agoMaybe I will take the plunge. Is there any real value to learning Haskell? There are so many different things I’d love to study.
- michaelsbradley 3y ago[flagged]
- nequo 3y agoThis is a very valid consideration. 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.
- petemir 3y ago> and some elements of it carry over to other languages, for example, type classes and Rust’s traits. Add react to the list
- acchow 3y ago> 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).
- nequo 3y agoLenses 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: https://nostarch.com/learn-physics-functional-programming https://nostarch.com/learn-physics-functional-programming
- deleted 3y ago[deleted]
- itishappy 3y agoIt doesn't need to be. You can do so much with just data declarations and typeclasses. https://www.simplehaskell.org/ https://www.simplehaskell.org/ (disclaimer: not a huge fan of the sight design, but I fully support the concept)
- weatherlight 3y agoI get your reluctance to dive into a new language just for one project. But here's the deal: Haskell's strong type system and emphasis on pure functions can actually make you a better programmer in any language. Its lazy evaluation is a unique feature that optimizes performance, and it's built with concurrency in mind. Plus, in Haskell, you really can't cheat your way out of functional programming. The language enforces it, so the code you write will be functional, unlike in Python where you can mix paradigms. Even if you're a Python devotee, the principles you'll learn from Haskell can offer a new lens for problem-solving. It's not just about learning a new language; it's about broadening your skill set.
- 7thaccount 3y agoThere's always some value in learning a new paradigm, but Haskell always felt less useful to me than learning other tools and esoteric technologies. That's a personal belief though and it's subjective. Some people love Haskell and get a lot of power from it. Python mostly hits an optimal point for my needs though and I didn't have to read 50 articles trying to explain what a Monad was. Scripting languages just click a lot better for me (less ceremony). There are some weird languages I like such as APL. APL is also very mathy, but there's essentially no ceremony (just some funny symbols that are easy enough to learn).
- chowells 3y agoAh. You found Haskell hard because you were trying to learn it out of order. Demanding to understand what a monad is before learning how higher-order functions and higher-kinded polymorphism work in Haskell is like demanding to know what an Iterator is before learning what a variable is in Java. The thing about "Monad" is that it's an absolutely trivial interface. You'll know you actually understand it properly when you go "oh, that's all." Is it hard to describe? Not when you understand the underlying concepts. But if you demand to skip them, you're only going to confuse yourself.
- appleaday1 3y agohttps://bartoszmilewski.com/2021/02/16/functorio/ https://bartoszmilewski.com/2021/02/16/functorio/
- 7thaccount 3y agoNo, but a good assumption. I read several books and dozens of tutorials including parts of the 1000 page one that couple did like 6 years ago. Function application and so on definitely came before IO and the likes. It all just seemed like enormous mental effort for the simplest of things. That was my experience at least. It's possible I just don't have the best kind of brain for FP. Your mileage will vary of course. This was just my experience. I know Haskell is powerful, but it wasn't right for me. I haven't met a scripting language I didn't like yet though, so perhaps my neurons are just wired for that now. I do enjoy the random APL or Forth problem though and I'm decent at SQL after using it often for a decade.
- adamddev1 3y agoYes, I benefited greatly from learning Haskell. Found myself writing beautiful new abstractions in TypeScript based on what I learned. I suggest going through https://haskell.mooc.fi/ https://haskell.mooc.fi/ to learn. Beyond the practical value you'll also discover the delightful beauty with which you can express things in Haskell, and these sparks of joy could give you a new motivation to grow and appreciate deeper, beautiful ways of coding and thinking.