5 ms·
it’s easy to learn and easy to get started with Don’t disagree with a lot of the rest of your post, but this is a real, genuine virtue and ought not to be ligh
by bradleyjg 3y ago
it’s easy to learn and easy to get started with
Don’t disagree with a lot of the rest of your post, but this is a real, genuine virtue and ought not to be lightly dismissed.
- epgui 3y agoPython is not fundamentally any easier to use or to learn than something like Haskell or Clojure or Racket or Scheme (I'd argue the contrary) though. It's only true in practice out of sociohistorical accident, because your colleagues can show you how to use it to do things, because their colleagues once showed them.
- lpapez 3y agoThis is just an absurd statement, of course Python is easier to learn than either of those languages. I've taught Haskell at an university and almost none of the students ever found the model of computation natural. I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense. That being said, I absolutely see the value of the latter, and consider it a good thing that functional concepts are gaining popularity in imperative languages.
- tome 3y agoWould it be possible to give a small example of Haskell versus Python that shows why Python's model of computation is different to and easier than Haskell's?
- homborg 3y agoImagine writing a cooking recipe or any kind of instructions. They seem naturally sequential and an imperative to me. I can't imagine how a list of instructions would be clearer in haskell.
- epgui 3y agoThat's an argument from incredulity... https://en.wikipedia.org/wiki/Argument_from_incredulity https://en.wikipedia.org/wiki/Argument_from_incredulity
- tome 3y agoI suppose I was looking for a more typical programming example than a cooking recipe, but even so I don't see why Haskell would have a problem there. I wouldn't claim it would be clearer but I still don't see why it would be worse. cook meat sauce = do pan <- getPan addTo pan meat cookFor pan 10 addTo pan sauce cookFor pan 3 food <- contents pan pure food
- epgui 3y ago> I wouldn't claim it would be clearer Although written in an imperative style and thus superficially similar, the haskell differs in that it is referentially transparent. I think that makes it objectively clearer, because it implies certain guarantees that nothing will surprise the reader.
- tome 3y agoThat's a good point! Python's weird scoping rules can make code very unclear.
- tasuki 3y agoMonads are exactly the mechanism for chaining instructions, how could it get any clearer than that?
- epgui 3y ago> I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense. It is not at all obvious that this is truly the case. If it was the case, why didn't humans intuitively develop mathematics from a computational foundation? It took centuries before we made the leap from mathematical abstractions to Turing machines, and the two are (in some great general sense) isomorphic.
- temporarely 3y ago"I think we humans simply find following a series of steps easier than reasoning in an abstract mathematical sense" + to perform tasks. So, you are right regarding the mindset of human philosophers, but that is not the sort of problems OP's students were tasked with solving.
- epgui 3y agoI wasn't thinking about philosophers in particular, but rather about mathematicians and scientists.
- FrustratedMonky 3y agoI would disagree. Javascript is as easy to learn as any language, like understanding the syntax of a loop or an if-statement. But to do anything practical at all, I'd say you quickly bump into a jungle of libraries you need for everything, and then it is just as complicated as any other language, or more. The javascript ecosystem is a nightmare.
- miki123211 3y agoJavascript doesn't have a good "starting point". Either you learn it in the browser, and then you need to learn HTML first, or you learn it in node.js, and then it's hard to get Python levels of "fun". In Python, input() is one of the first things you learn, and that actually lets you make somewhat interesting programs. Once you learn loops and conditionals, you know enough to write a "guess the number" game, which is probably the simplest actually useful program you can make. Once you learn to deal with files, you already get superpowers, you don't even need functions, classes and such for simple, text-munging scripts. Node makes this a lot harder, the simplest way to have interactivity is the readline library, and that requires you to understand functions, closures and the idea of a callback and why one is needed. Then there's the "R way" of learning Python, in a Jupyter notebook, by stringing functions from Numpy, Pandas, Matplotlib and perhaps some other libraries in your field together, with no understanding of what a loop is, because you don't really need those for basic dataframe and tensor work.