A preview of Coalton 0.2, a statically-typed Lisp
7 hours ago
- #static-typing
- #functional-programming
- #Common-Lisp
- Coalton is a statically typed functional programming language embedded in Common Lisp, used in production for robust and efficient products.
- Upcoming changes include fixed arity functions, replacing Haskell-style currying for better API design, type error messages, and compilation efficiency.
- Fixed arity functions enable keyword arguments and more natural calling conventions, improving usability and reducing implicit closure allocations.
- Multiple value returns are now natively supported, simplifying functions that return tuples and improving efficiency.
- The role of `Unit` and `Void` is clarified, with `Void` now indicating zero inputs or outputs in function types.
- New syntax for collections and associations introduces overloaded literals and comprehensions, enhancing expressiveness.
- Short lambda syntax (`\x.x`) is introduced for concise anonymous functions, reducing boilerplate for small functions.
- Scoped type variables with `forall` allow referencing declared type variables in function bodies, simplifying type constraints.
- Real algebraic numbers are added for exact arithmetic with roots of polynomials, useful in CAD and mathematical applications.
- A new `coalton/xmath` module is introduced for advanced mathematical features, including various number types and FFTs.
- Other improvements include type system soundness fixes, standard library renaming, and the introduction of versioning starting with Coalton 0.2.