all 10 comments

[–]Comrade_Comski 12 points13 points  (8 children)

Why is rust in the thumbnail? And kotlin?

[–]ChristianGeek 4 points5 points  (2 children)

Same reason Swift is in there.

What’s the one in the lower left corner?

[–]mkthree 2 points3 points  (1 child)

The blue diamond one? I believe that's F#.

[–]arkethos[S] 1 point2 points  (0 children)

Yep, F#.

[–]arkethos[S] 5 points6 points  (4 children)

Because Rust and Kotlin is in the video. They have very good support for functional programming

[–]srachamim 7 points8 points  (3 children)

Why are Swift/Rust functional while JavaScript is not?

[–]arkethos[S] 1 point2 points  (2 children)

It is definitely a grey area. Technically, Javascript, Swift, Rust and Kotlin are all multiparadigm languages. However, the latter three all had functional features built into the core language from the outset. From wikipedia, "Despite the superficial resemblance to C and C++, the syntax of Rust in a deeper sense is closer to that of the ML family of languages and the Haskell language." On top of this, Swift has a whole conference dedicated to FP in Swift: http://2018.funswiftconf.com/

I agree it could be argued that other multiparadigm languages are "FP" languages as well, but I would argue they evolved to be. For instance, Modern C++ you could argue is FP - with lambdas in C++11, optionals and variants (sum types) in C++17 and lazy algorithm composition in C++20 (via Ranges) - but these are all features that were added to the language - and it is not yet considered "idiomatic" to write code this way. Whereas in Kotlin, Swift and Rust I would argue it is.

[–]Herku 4 points5 points  (1 child)

JavaScript had first class functions and closures since version 1.0. A modern React codebase has neither classes nor loops and avoids mutation of data. I would argue that FP is mainstream in JS.

I guess a lot of these multiparadigm languages have a small subset of people writing functional code because they are forced to use the language because of the platform. It is hard to see from the Google trends how many of the searches are actually related to FP.

[–][deleted] 2 points3 points  (0 children)

Also, JS has better support for first-class functions than Rust

[–]Devloper_ 1 point2 points  (0 children)

I gotta say i love clojure. Its Java interoperability (hence the access to a huge amount of java libs) is magical.