top | item 45846222

(no title)

gregwebs | 3 months ago

Functional programming is immutable by default. TypeScript and many other typed languages don't really stop you from clobbering things, particularly with concurrency. Rust does. But immutability with GC is a lot easier to use than Rust if you don't need the performance of Rust.

discuss

order

pjmlp|3 months ago

That is only true since people started equating FP with Haskell.

OCaml as the discussion subject on this thread, allows for mutable data structures, and I am old enough to have been taught Lisp as one possible avenue for FP.

nrlucas|3 months ago

They have mutability, but it's generally not encouraged. The default is immutability.

galangalalgol|3 months ago

But what is functional besides haskell? Purescript? Elm I guess. Ocaml is not. It has for loops even. You can write pure functional ocaml but people don't. It mattered a lot less when it didn't have true concurrency, but now clobbering things in ocaml is quite possible.

greener_grass|3 months ago

Define functional?

Even Haskell is not functional in the strictest sense. It has unsafe IO. It can throw exceptions. Functions may not halt.

phplovesong|3 months ago

FP has nothing to do with mutability. You seem to lack a basic understanding what the common FP languages are, and what FP actully is.

e12e|3 months ago

StandardML (standard metalanguage), scheme?