3 ms·
The diff between Haskell and Python is not functional programming, I program functionally in Python, it is the type system. This is subjective, but having trie
by ntoshev 11y ago
The diff between Haskell and Python is not functional programming, I program functionally in Python, it is the type system.
This is subjective, but having tried Elm with its Haskellish type system, it seems that the type system makes me think hard about things that ultimately don't matter much. It might depend on your problem, but I doubt it. Even doing numerical computation with Theano I find myself better off just executing subexpressions and seeing results and the shape of the tensors interactively is more useful than thinking really hard how the operations transform the shape.
- j-pb 11y agoIf you're using persistent datastructures like pyrsistent I could agree, but vanilla python is very unsuited for functional programming. Even JS has better lambdas.
- codygman 11y ago> This is subjective, but having tried Elm with its Haskellish type system, it seems that the type system makes me think hard about things that ultimately don't matter much. It might depend on your problem, but I doubt it. Even doing numerical computation with Theano I find myself better off just executing subexpressions and seeing results and the shape of the tensors interactively is more useful than thinking really hard how the operations transform the shape. If it is true that the type system, perhaps static type systems in general, make you think hard about things that ultimately don't matter much... why not go for the most dynamic and interactive language possible? Clojure perhaps. I've been toying with the idea that either fully dynamic and as interactive as possible or full dependent typing is the generally right answer. By right, I mean what you should reach for with most programming tasks if you aren't going to put effort into selecting one tailored to your task.