

Discover more from hrbrmstr's Daily Drop
On The Eleventh Day Of Quick Drops 🎅🏽hrbrmstr🎅🏽 Gave To Me…
🎶 New Languages A-Brewing 🎶
(If this is your first Xmas Quick Drop, head back to Day 01 to find out what's going on.)
“Back in my day” programming language creation pace was slow and steady. Sure, compsci academics needed to keep creating new ones to warrant cranking out middling-quality papers (which, tbh, I'm increasingly realizing are mostly the academic versions of TPS reports). Today, programming language creation is fairly democratized, which has led to a nigh flood of new ones cropping up, seemingly, daily.
Today's Quick Drop is appropriately named as it's #1's bday & #2.1 has consumed virtually every free cycle his pampa can muster. So, here are three languages I'm keeping an eye on (two of them, as often as I can spare), and just haven't gotten around to featuring in previous drops.
Unison
Unison [GH] is my fav amongst the three. This is why:
Each Unison definition is identified by a hash of its syntax tree.
Put another way, Unison code is content-addressed.
Each Unison definition has a unique and deterministic address (its hash) in this vast immutable address space. Names are like pointers to addresses in this space. We can change what address a name points to, but the contents of each address are forever unchanging.
This starting assumption provides some surprising benefits: it simplifies distributed programming, eliminates builds and dependency conflicts, supports typed durable storage, structured refactorings, enables better tools for working with code, and lots more. Let's go over how each of these benefits emerges.
Hit the link for a deeper dive into the deets, and this link for those who like to get right to the code.
Koka
While promiscuous object [type] [re]assignments may be great for capricious Python developers (OK, mebbe R folks, too), strongly typed languages are just plain safer (*prepares for hate mail*). Furthermore, functional-style languages tend to flow and read better.
As such, I'm kinda hoping Koka [GH] concepts evolve into a generational leap in some other existing languages (some are close, now, tho).
The core of Koka consists of a small set of well-studied language features, like first-class functions, a polymorphic type- and effect system, algebraic data types, and effect handlers. Each of these is composable and avoid the addition of “special” extensions by being as general as possible.
Koka tracks the (side) effects of every function in its type, where pure and effectful computations are distinguished. The precise effect typing gives Koka rock-solid semantics backed by well-studied category theory, which makes Koka particularly easy to reason about for both humans and compilers.
Effect handlers let you define advanced control abstractions, like exceptions, async/await, iterators, parsers, ambient state, or probabilistic programs, as a user library in a typed and composable way.
Perceus is an advanced compilation method for reference counting. This lets Koka compile directly to C code without needing a garbage collector or runtime system! This also gives Koka excellent performance in practice.
Perceus also enables reuse analysis and lets Koka optimize functional-style programs to use in-place updates when possible.
For those who just want code samples: here ya go!
Vale
Who wouldn't want a language that is fast, safe, and easy?
Vale [GH] is an ahead-of-time compiled to LLVM, statically typed, and uses a new generational references technique for memory safety with speed and flexibility, and will soon have region borrow checking to make it even faster.
Features include:
Single Ownership and move semantics without needing a borrow checker.
Higher Resource Acquisition Is Initialization (RAII), which helps in remembering to call any function at some point in the future.
Statically Typed with type inference.
Memory Safe with generational references
Generics and
const
genericsUniversal Function Call Syntax
Mutable and Immutable Objects
Patterns with de-structuring
Regions for different allocation strategies. (planned!)
Interface Constructors (planned!)
Dive right into the code.
FIN
Speaking of programming languages, Andrew Healey decided to use 2021's Advent of Code to design a new programming language. Check out Adventlang after reading through the blog/diary. ☮