Draft:Coalton (programming language): Difference between revisions

Content deleted Content added
Stylewiki (talk | contribs)
add reference to Hindley-Milner mutation issue, fix verbiage a little
Citation bot (talk | contribs)
Add: issue, volume, date, website, title. Changed bare reference to CS1/2. | Use this bot. Report bugs. | Suggested by LeapTorchGear | #UCB_webform 215/522
Line 32:
}}
 
'''Coalton''' is a [[functional programming|functional]], [[static typing|statically typed]], [[General-purpose programming language|general-purpose]] [[programming language]] embedded in [[Common Lisp (programming language)|Common Lisp]]. Its type system is similar to Haskell's, but evaluation is strict like Standard ML or OCaml. [[Metaprogramming]] is supported through traditional Lisp [[Macro (computer science)|macros]]. Coalton focuses on performance through efficient data representation and compiler optimization<ref>{{cite web | title=Toward safe, flexible, and efficient software in Common Lisp - European Lisp Symposium 2025 | website=[[YouTube]] | date=20 May 2025 | url=https://www.youtube.com/watch?v=of92m4XNgrM }}</ref>.
 
''Coalton'' refers to both the language and its implementation, and remains under active, open-source development as of July 2025<ref>{{cite web | title=Coalton | website=[[GitHub]] | url=https://github.com/coalton-lang/coalton }}</ref>.
 
 
== History ==
Robert Smith started designing Coalton in 2018<ref>{{cite web | title=Deprecated-coalton-prototype/Thoughts.md at master · stylewarning/Deprecated-coalton-prototype | website=[[GitHub]] | url=https://github.com/stylewarning/deprecated-coalton-prototype/blob/master/thoughts.md }}</ref> to import the benefits of [[ML (programming language)|ML]]-like static typing into the interactive, incremental programming environment of Common Lisp. Coalton was further developed by a team led by Smith and was officially announced in 2021<ref>{{cite web | title=Introducing Coalton: How to Have Our (Typed) Cake and (Safely) Eat It Too, in Common Lisp | date=10 September 2021 | url=https://coalton-lang.github.io/20211010-introducing-coalton/ }}</ref>. Coalton has since been used for quantum computing research, the implementation of the [[Quil (instruction set architecture)|Quil]] compiler<ref>{{cite web | title=Using Coalton to Implement a Quantum Compiler | date=6 September 2022 | url=https://coalton-lang.github.io/20220906-quantum-compiler/ }}</ref>, and defense applications.
 
Coalton is used<ref>{{cite web | title=APS -2023 APS March Meeting - Event - A language-oriented approach to exchange-only silicon dot qubit software | volume=68, 3 | url=https://meetings.aps.org/Meeting/MAR23/Session/F70.8 }}</ref> at [[HRL Laboratories]] for building software for qubits based on exchange-only [[Silicon quantum dot|silicon dots]].
 
== Features ==
Line 144:
When Coalton is written as a part of <code>.lisp</code> files, it requires wrapping the Coalton code in <code>coalton</code> or <code>coalton-toplevel</code> macros. This detracts from the incremental development style of Common Lisp.<ref>https://news.ycombinator.com/item?id=35704441</ref>
 
A more serious criticism is that Hindley-Milner type systems are unsound when mutation is allowed<ref>{{cite journal |last1=Wright |first1=Andrew |title=Simple imperative polymorphism |journal=LISP and Symbolic Computation |date=1995 |volume=8 |issue=4 |pages=343–355 |doi=10.1007/BF01018828 |url=https://link.springer.com/article/10.1007/BF01018828 |access-date=10 August 2025}}</ref>, and Coalton allows mutation. Several fixes to the type inference algorithm have been proposed.<ref>{{cite web | title=Certain combinations of polymorphism and mutation can lead to type-unsoundness · Issue #84 · coalton-lang/Coalton | website=[[GitHub]] | url=https://github.com/coalton-lang/coalton/issues/84 }}</ref>
 
== References ==