News for hackers. Stuff that matters.
Re:Is .NET just miles ahead or am I delusional? by lpapez on Saturday April 13, 2024 @07:51AM (#40022494)
This 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.

Re:Is .NET just miles ahead or am I delusional? by tome on Saturday April 13, 2024 @08:23AM (#40022682)
Would 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?
Re:Is .NET just miles ahead or am I delusional? by homborg on Saturday April 13, 2024 @10:01AM (#40023210)
Imagine 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.

Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @12:08PM (#40024055)
That's an argument from incredulity... https://en.wikipedia.org/wiki/Argument_from_incredulity
Re:Is .NET just miles ahead or am I delusional? by tome on Saturday April 13, 2024 @03:02PM (#40025211)
I 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
Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @08:06PM (#40027446)
> 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.

Re:Is .NET just miles ahead or am I delusional? by tome on Sunday April 14, 2024 @05:06AM (#40029807)
That's a good point! Python's weird scoping rules can make code very unclear.
Re:Is .NET just miles ahead or am I delusional? by tasuki on Saturday April 13, 2024 @03:23PM (#40025329)
Monads are exactly the mechanism for chaining instructions, how could it get any clearer than that?
Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @12:10PM (#40024070)
> 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.

Re:Is .NET just miles ahead or am I delusional? by temporarely on Saturday April 13, 2024 @01:09PM (#40024451)
"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.

Re:Is .NET just miles ahead or am I delusional? by epgui on Saturday April 13, 2024 @02:57PM (#40025187)
I wasn't thinking about philosophers in particular, but rather about mathematicians and scientists.