Hacker News new | ask | show | jobs
by pjmlp 4295 days ago
They didn't need Swift for real world examples.

F#, Scala, OCaml, Haskell, Clojure already have uses at big financial corporations and bio-informatics.

However, Swift is another great way for spreading the ML gospel to mainstream developers, specially if it slowly takes Objective-C's place in Apple's heart.

2 comments

Scala/Clojure have been used pretty much everywhere.

Especially with the move towards microservices and reactive architectures.

Does Clojure support pattern matching? AFAIK, the only thing that is "functional" about Clojure is its immutable data structures (and closures, but even JS has those).
Funny to call a Lisp dialect functional between quotes. When Lisp and lambda calculus are the very genesis of FP.

Yes, Lisp can do pattern matching, usually implemented via macros,

In Clojure you use the core.match library.

Well, 1930's functional programming. Those techniques developed into various type theories pretty quickly (at the time for foundational reasons, but also for comprehension/management/expressiveness reasons).

Or if you have a more strict reading, Lisp is implementation-driven FP in the 70s compared to theory-driven FP from the time.

Yes, but keeps being functional programming.

Even Haskell does not have all the mathematics theory that one could apply to functional programming.

A programming language to be representative of a programming paradigm does not need to have 100% of all ideas out there.

I think it kind of does. FP is a moving target---more of a cultural identity than a technical definition. As it becomes more mathematically focused it will become less applicable to (some) Lisps. If this progression continues and dependently typed languages become increasingly practical we may someday call them FP-without-quotes and even displace things like Haskell and OCaml.
Except you assume there is ONE definition of what FP is, which every researcher will have a different opinion of.
I'd call Common Lisp functional between quotes.
> AFAIK, the only thing that is "functional" about Clojure is its immutable data structures (and closures, but even JS has those).

Oh, you sweet summer child. Work with a language without closures and try to do anything functional.

Which language? C++? Java? Both now have closures. Closures aren't the indicator that a programming language is functional; I need something more - though I admit that I'm mostly used to static functional languages, I guess ADTs are not so useful in a dynamic language.
As with any programming paradigm, its not really useful to think of "functional" as a binary feature of programming languages, but rather an approach for which programming languages have varying degrees of support.
At very least it needs to be able to have directly support for lambda calculus.
It has a support for destructuring, but no true pattern matching. Given the lack of algebraic data types, there's the question on what pattern matching would be supposed to match on.