Hacker News new | past | comments | ask | show | jobs | submit | homborg's comments login

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.


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


> 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.


That's a good point! Python's weird scoping rules can make code very unclear.


Monads are exactly the mechanism for chaining instructions, how could it get any clearer than that?


That's an argument from incredulity... https://en.wikipedia.org/wiki/Argument_from_incredulity


I read it as: we want a better explanation, than just: "new physics!"


As far as I can tell, the are no issues with the `function` keyword in csp mode, but the `Function` constructor, eg.

`Function("a", "console.log(a);")`

Your example is a callback with an anonymous function.

Do you have any links to discussions about your issue?


If you open the Network tab of Chrome Developer Tools and start the video, you can find the request for the video and open it in a new tab.


It's seems many people are comparing Grunt to Gulp, without considering the subtitles:

Grunt is the "JavaScript Task Runner" and Gulp is "The streaming build system"

There is not much point in using grunt for building or gulp for running tasks, IMHO.

My team is moving towards using gulp for js/css builds and make for tasks. We used grunt before. We probaby should use npm for tasks, though (cross-platform).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: