What the imperative shell of an Functional Core/Imperative Shell language looks like

This page summarizes the projects mentioned and recommended in the original post on /r/ProgrammingLanguages

Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • SaaSHub - Software Alternatives and Reviews
  • Charm

    Source code for the Charm programming language (by tim-hardcastle)

    No, it's "shell" as in "shell of the code". The idea is that the imperative bits of the language, the bits that do the mutation of state and the IO, can can call lovely pure referentially transparent functions. But functions can't call commands (otherwise by definition they wouldn't be pure). So all your imperative-ness is reduced to about 1% of your code which lives right at the top of your call stack --- the "imperative shell" of your code. See [here](https://github.com/tim-hardcastle/Charm/blob/main/examples/adv.ch) for an example. The "imperative shell" is the main function --- all 13 lines of it --- and everything everywhere else is pure and immutable.

  • flix

    The Flix Programming Language

    I like it. Modern languages that distinguish between pure and impure programs like Flix, Koka, and Effekt do so on the type level instead of syntactically. This has three advantages:

  • Onboard AI

    Learn any GitHub repo in 59 seconds. Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.

  • effekt

    A research language with effect handlers and lightweight effect polymorphism

    I like it. Modern languages that distinguish between pure and impure programs like Flix, Koka, and Effekt do so on the type level instead of syntactically. This has three advantages:

  • promises-spec

    An open standard for sound, interoperable JavaScript promises—by implementers, for implementers.

    Advantage 1, nesting, is the most important here, and it's often the most-overlooked advantage. Overlooking nesting is how Promises in Javascript got to be fundamentally broken.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts