Hacker News new | ask | show | jobs
by frik 4001 days ago
Javascript / Nodejs

it's multi-paradigm: scripting, object-oriented (prototype-based), imperative, functional ( source: https://en.wikipedia.org/wiki/JavaScript )

Many languages known as functional (Scala, F#, Lisp, Scheme, OCaml) are multi-paradigm languages (check out Wikipedia!), purely functional programming language like Haskell are the exception (https://en.wikipedia.org/wiki/Purely_functional ). And the IO part is hardly functional.

@Down voter: care to explain?

2 comments

All I can think is... Poe's Law.

https://www.youtube.com/watch?v=ztVMib1T4T4

I was like wait what...Then I saw your comment.

Yup Pretty much same reaction to that suggestion.

A CoffeeScript coder who apparently doesn't like JavaScript.
No IO in Haskell is purely functional. Your Haskell program wires up a computation that is eventually run by the runtime. The wiring up, as described in Haskell, supports referential transparency and composition as only pure code can. Your confusion may arise from people using the term "pure" to differentiate from "monadic".
All I meant is IO (aka input/output) can have side effects outside of the scope of the language environment. Haskell has the IO type to encoding those this side effects: https://wiki.haskell.org/Introduction_to_IO
I haven't decided yet, check out this link to decide for yourself:

https://leanpub.com/purescript/read#leanpub-auto-the-eff-mon...