r/functionalprogramming • • Apr 03 '22

Question What developments have there been in FP over the last 10 years?

I was wondering what important new developments in FP have occured during the last 10 years or so.

Most of the well-known languages that I can think of as FP languages all date from before 2010. Scala is 2004, Clojure is 2007, OCaml is 1996, Racket is 1995 and Haskell is 1990.

Have there been major developments in immutable data structures or type systems over the last 10 years? Or maybe developments in interoperation between typed and untyped languages? Have FP languages experimented with ada-spark like contracts?

What has been the main thrust of the development of FP languages over the last 10 years?

43 Upvotes

14 comments sorted by

18

u/accidentally_myself Apr 03 '22

I'm quite interested in this topic myself. Here's one smallish development I know of:

https://www.staff.ncl.ac.uk/andrey.mokhov/selective-functors.pdf

I think the main industry (not research) trend is that mainstream languages are continually evolving FP features. I could not believe it when Java 10 got local type inference. Sounded like a sentence from an out-there sci-fi novel.

18

u/swoogles Apr 04 '22

From my interactions with the FP community- We all get paid to use those languages you mentioned, but we excitedly talk about Unison in our free time.

https://www.unison-lang.org/

It's got many fascinating ideas built into the language. The content-hashing of all the code enables wild powers over your codebase.

9

u/editor_of_the_beast Apr 04 '22

F* has been at the center of a ton of research. It’s being used to build real-world verified cryptographic software. Most of the research is around how to use the core dependently typed language to help with automated proving of theorems.

We also got a formal semantics for WebAssembly in Isabelle/HOL, which can be used for verification of the standard itself as well as tools which compile to WebAssembly.

Uniqueness types were also used in Cogent to automate parts of proving systems software such as filesystems correct.

As you might imagine, I’m most into the verification community where FP is at the core of everything. And there’s a quite a lot going on on that front, we’re able to verify much more practical software than we were even 10 years ago.

5

u/gasche Apr 04 '22

Off the top of my head:

  • A lot of dependent types, including sizeable verification projects (now we have the impression that, given enough resources and clear specs, we could verify code from basically any problem domain), some progress on pure math, some progress on proof automation but maybe less than could be expected.

  • The impression that effect typing may be ready for use by mere mortals, which I think wasn't really there 10 years ago. Koka is the front runner here.

  • Effect handlers, as a structured approach to delimited continuations, or another take on effectful programming.

  • Some successes of functional approaches in other problem domains. (For example: a functional DSL to express GPU operations, plus some moderately clever self-tuning code, and voila you get competitive performance.)

  • Iris, a working program logic for effectful (mostly "stateful", but not only) and concurrent programming.

  • Continued connections with constructive mathematics, and in particular the explosive development, among theoreticians, of homotopy type theory.

  • A large transfer of people techniques from the "verification and language design" community to the "blockchain, smart contract and hype money" community.

2

u/gasche Apr 04 '22

Have FP languages experimented with ada-spark like contracts?

I would say that Why3 is the most approchable system for static verification of ada-spark like contracts, and in fact my understanding is that GNAT people are using the Why3 technology for their static verification effort too. Honorable mentions to F* and Liquid Haskell as well.

→ More replies (2)

4

u/Daenyth Apr 04 '22

One of the big trends is monadic effect systems becoming more mainstream. Things like rust's tokio and scala's cats-effect provide a very strong foundation for building concurrent applications in a functional way

https://www.youtube.com/watch?v=qgfCmQ-2tW0

3

u/szpaceSZ Apr 04 '22

Well, in the last ten years, FP has fertilized PP and OOP, think Rust and Kotlin.

3

u/KyleG Apr 04 '22

I know from a couple years back there are some new optics like Kaleidoscopes and Grates but I don't think they've got much use yet because few people understand them. I've only seem them referenced in a couple academic papers, and Chris Penner has written a blog entry or two about them.

13

u/[deleted] Apr 04 '22

[removed] — view removed comment

1

u/[deleted] Oct 01 '22

Same for Scala, the third major version has recently been released that incorporates development from the better part of the last decade and bundles a massive list of improvements.

With that out of the way (though still evolving relatively rapidly, now that some issues hindering that have been solved) Odersky has just started a half decade, 35-42 person-years worth of research into "effects as capabilities"

If he succeeds and we can basically have monadic code without the overhead of monadic style, that would be wery interesting. Until then, this might help once loom lands.


though probably still too complex for the industry unless the team is managed very very well (in which case it is probably still a great option) so I'm looking into clojure right now