4 ms·
Erlang is probably not the best example. Programmers using Erlang are almost certainly of a different caliber than those using Ruby and Python. I don't think it
by bollockitis 11y ago
Erlang is probably not the best example. Programmers using Erlang are almost certainly of a different caliber than those using Ruby and Python. I don't think it's very productive to study dynamic versus static typing without also controlling for the experience and discipline of the programmer. This is an element that many of the academics want to ignore because it's difficult to quantify, but I wouldn't trust any argument that exluded the human element because it's ultimately humans who use these tools. I still haven't seen anyone address Elben Shira's original point about the difficulty involved in understanding the return values of a function: what's really in that immutable request map? How do I use it?
Given experienced and disciplined programmers, the type system probably isn't as important. But given the quality of programmers who are using these languages in the real world, a good type system does seem to help.
- wtetzner 11y agoThat's the thing, experienced programmers are also better able to use the type system to encode program invariants, beyond just making sure you don't pass a string where an int is expected.
- yogthos 11y agoYeah, but do you seriously expect an inexperienced programmer to be able to drive a language like Haskell?
- nrinaudo 11y agoI've heard various CS teachers say that, when presented with Haskell as a first language, students took to it like a fish to water and could start writing useful code really fast. My personal experience is that Haskell isn't really all that complex - when you stick to the core, it's actually fairly simple, with a small set of well thought out features (compared to Scala, for example, which I love but has a lot of features). Strangely enough, what I find hard when dealing with Haskell is the syntax, because it's so different from all the languages I've been taught or taught myself in the past. That shouldn't be a problem for people that have little to no previous experience and tackle it with a virgin mind.
- yokohummer7 11y agoWhat you said is purely anecdotal. Here's another anecdote I think worth mentioning (it is from a Haskeller who has spent years teaching Haskell to kids): https://www.reddit.com/r/haskell/comments/3pfg7x/either_and_in_haskell_are_not_arbitrary/cw6hlw7 https://www.reddit.com/r/haskell/comments/3pfg7x/either_and_... > this experience has taught me that whenever functional programmers claim that certain things are only unintuitive because programmers have had their minds polluted by non-Haskell programming languages... they are usually wrong. > the more common claims you see about how purely functional programming is easier and more intuitive for students without previous imperative programming languages. Surprisingly, that's not the case. Even in situations where I don't expect it, I'm constantly fighting everyone's urge to think about situations first and foremost in imperative terms. I think it's safer to assume that functional approaches have inherent complexity compared to imperative approaches. YMMV, of course.
- wtetzner 11y ago> I think it's safer to assume that functional approaches have inherent complexity compared to imperative approaches. YMMV, of course. Complexity and intuition aren't the same thing. I would argue that the point of functional programming is to reduce and control complexity.