Draft:Unison (programming language)

{{AFC submission|d|nn|u=M0nt3c1t0|ns=118|reviewer=CitrusHemlock|reviewts=20250318125523|decliner=CitrusHemlock|declinets=20250318125721|ts=20250317151717}}

{{AFC submission|d|nn|u=Mechachleopteryx|ns=118|decliner=Festucalex|declinets=20230722070954|small=yes|ts=20230722000016}}

{{AFC comment|1=All sources are either personal blogs or primary. CitrusHemlock 12:57, 18 March 2025 (UTC)}}

{{AFC comment|1=No independent sources. Please read WP:RS and WP:INDEPENDENT, edit accordingly, and resubmit. Festucalextalk 07:09, 22 July 2023 (UTC)}}

----

{{Short description|The unison programming language.}}

{{Draft topics|software|computing|technology}}

{{AfC topic|stem}}

{{Infobox programming language

| name = Unison

| logo = File:Unison Logo Dark.png

| logo size = 140px

| screenshot =

| screenshot caption =

| paradigm =

| designer = [https://www.unison-lang.org/unison-computing/ Unison Computing]

| developer = [https://www.unison-lang.org/unison-computing/ Unison Computing]

| latest_release_version = v0.5.36

| latest_release_date =

| latest preview version =

| latest_preview_date =

| typing =

| implementations =

| dialects =

| influenced by = Haskell, Erlang

| influenced =

| programming language =

| platform = x86-64

| operating system = Linux, macOS, Windows

| license = MIT

| file ext = .u

| website = {{Official website|https://www.unison-lang.org/|name=unison-lang.org}}

}}

Unison is a statically-typed programming language primarily influenced by Haskell, Erlang, and Frank.{{Cite web|url=https://univalence.io/blog/articles/unison-langage/|title=Unison langage|website=univalence.io|access-date=2023-07-21}}

Unison's primary characteristic is that it is a content-addressed and immutable language. It is designed for modern, functional programming, with the unique capability to describe entire distributed systems using a single program.{{Cite web|url=https://www.unison-lang.org/|title=Unison|website=unison-lang.org|access-date=2023-07-21}}

Language Overview

Unison's core philosophy is that each definition in the language is uniquely identified by a hash of its syntax tree, meaning Unison code is content-addressed.{{cite web|last1=Warski|first1=Adam|title=Trying out Unison, part 1: code as hashes|url=https://softwaremill.com/trying-out-unison-part-1-code-as-hashes/|website=SoftwareMill Tech Blog|accessdate=2023-07-21}}

This unique identification allows Unison to simplify distributed programming, eliminate builds and dependency conflicts, support typed durable storage, enable structured refactorings, and provide better tools for working with code.{{Cite web|url=https://www.unison-lang.org/learn/the-big-idea/|title=The big idea|website=unison-lang.org|access-date=2023-07-21}}The Meerkat Vision: Language Support for Live, Scalable, Reactive Web Apps, João Costa Seco and Jonathan Aldrich, 2024, https://doi.org/10.1145/3689492.3690048

=Content-Addressing=

Unison uses a 512-bit SHA3 digest to represent a term or a type's internal structure, excluding names. This hash acts as a unique identifier for the term or type declaration, allowing it to be unambiguously referred to in all contexts. In Unison, the hash of a term or type is considered its true name.{{cite web | url=https://itnext.io/writing-code-without-plain-text-files-cb8f1ed2c0ad?gi=fa5979d85e28 | title=Writing Code Without Plain Text Files | date=25 January 2023 }}

=Hash References=

Literal hash references in Unison have specific structures, with different formats for term definitions, mutually recursive definitions, data constructors, cyclic type definitions, and built-in references.{{Cite web

| title = Unison Programming Language - Literals

| url = https://www.unison-lang.org/learn/language-reference/literals/

| website = Unison Programming Language Official Website

| access-date = July 21, 2023

}}

Unison also supports short hashes, where a prefix of the base32Hex encoded SHA3 digest can be used instead of the full hash. If the short hash is long enough to be unambiguous in the given environment, Unison substitutes the full hash at compile time.{{Cite web

| title = Unison Programming Language - Hashes

| url = https://www.unison-lang.org/learn/language-reference/hashes/

| website = Unison Programming Language Official Website

| access-date = July 21, 2023

}}

=Dependency Management=

In Unison, dependency conflicts, which often arise due to different definitions competing for the same names in traditional programming languages, are not a concern. Instead, what might be perceived as a dependency conflict in Unison is merely a situation where multiple terms or types serve similar purposes. This flexibility in managing dependencies makes Unison an adaptable and developer-friendly language.{{Cite web|url=https://www.unisonweb.org/2020/04/10/reducing-churn/|title=How Unison reduces ecosystem churn|last=Chiusano|first=Paul|date=2020-04-10|website=unisonweb.org|access-date=2023-07-21}}

{{Cite web|url=https://renato.athaydes.com/posts/unison-revolution.html|title=A look at Unison: a revolutionary programming language|website=renato.athaydes.com|access-date=2025-03-17}}

External Links

  • [https://github.com/unisonweb/unison Unison on GitHub]
  • [https://renato.athaydes.com/posts/unison-revolution.html A look at Unison: a revolutionary programming language]
  • [https://www.youtube.com/watch?v=zHzpoVgqgc4 Rethinking Distributed Programming with Unison Lang]

References