Gleam (programming language): Difference between revisions

Content deleted Content added
Added paragraph about language adoption
comma
 
(10 intermediate revisions by 5 users not shown)
Line 2:
{{Use American English|date=March 2024}}
{{Use mdy dates|date=March 2024}}
{{Notability|date=March 2024}}
{{Infobox programming language
| name = Gleam
Line 34 ⟶ 33:
| website = {{URL|https://gleam.run/}}
}}
{{Portal|Computer programming|Free and open-source software}}
 
'''Gleam''' is a [[General-purpose programming language|general-purpose]], [[concurrent computing|concurrent]], [[Functional programming|functional]], [[High-level programming language|high-level]] [[programming language]] that compiles to [[Erlang (programming language)|Erlang]] or [[JavaScript]] source code.<ref name="Homepage" /><ref>{{cite news | url=https://www.infoworld.com/article/3713460/gleam-language-available-in-first-stable-release.html | title=Gleam language available in first stable release | first=Paul | last=Krill | work=InfoWorld | date=5 March 2024 | access-date=26 March 2024}}</ref><ref name="eastman">{{cite news | url=https://thenewstack.io/introduction-to-gleam-a-new-functional-programming-language/ | title=Introduction to Gleam, a New Functional Programming Language | first=David | last=Eastman | work=The New Stack | date=2024-06-22 | access-date=2024-07-29}}</ref>
 
Gleam is a statically-typed language,<ref>{{cite news | url=https://www.infoq.com/news/2024/03/gleam-erlang-virtual-machine-1-0/ | title=Erlang-Runtime Statically-Typed Functional Language Gleam Reaches 1.0 | first=Sergio | last=De Simone | work=InfoQ | date=16 March 2024 | access-date=26 March 2024}}</ref> which is different from the most popular languages that run on Erlang’s virtual machine [[BEAM (Erlang virtual machine)|BEAM]], [[Erlang (programming language)|Erlang]] and [[Elixir (programming language)|Elixir]]. Gleam has its own type-safe implementation of OTP, Erlang's actor framework.<ref>{{Cite AV media |url=https://www.youtube.com/watch?v=WaHx6n2UZJg |title=Getting to know Actors in Gleam – Raúl Chouza | series=Code BEAM America | date=2024-03-27 |language=en |access-date=2024-05-06 |via=YouTube}}</ref> Packages are provided using the Hex [[package manager]], and an index for finding packages written for Gleam is available.<ref>{{Cite web |title=Introducing the Gleam package index – Gleam |url=https://gleam.run//news/introducing-the-gleam-package-index/ |access-date=2024-05-07 |website=gleam.run |language=en-GB}}</ref>
 
== History ==
Line 49:
 
== Adoption ==
Gleam has seen growingsome adoption in recent years,.<ref supportedname=SOSurvey/> byAccording anto activea andblog enthusiastic community.post, Thethe language creators have placed strong emphasis on developer experience (DX), which has contributed to its appeal among functional programming enthusiasts and newcomers alike .<ref>[https://tahazsh.com/blog/why-gleam-is-good/ Why Gleam Is Good]</ref>.{{Better source needed|date=August 2025}}
 
Although it compiles to run on the BEAM [[virtual machine]], most new Gleam users do not have a background in Erlang nor Elixir, two older BEAM languages.<ref Accordingname=GleamSurveyPilfold/> toIn the2025, 2024Louis GleamPilfold Developerreported on Survey<ref>[https://gleam.run/news/developer-survey-2024-results/ Gleamfrom Developer Surveythe 2024 Resultsdeveloper survey, Gleamwhich website]received 841 responses.</ref name=GleamSurveyPilfold>{{Cite andweb core|title=Developer teamSurvey insights2024 asResults presented|last=Pilfold in|first=Louis "Gleam's journey on the BEAM" keynote talk<ref>[|url=https://wwwgleam.youtube.comrun/watch?vnews/developer-survey-2024-results |access-date=6I0IbJtUC3U2025-08-09 Gleam's Journey on the BEAM – YouTube]|website=gleam.run}}</ref>, thisPilfold trend suggestsconcluded that Gleam isdevelopers helping"overwhelmingly tocome expandfrom theother BEAMecosystems ecosystemother bythan attractingErlang developersand from other programming communitiesElixir".<ref name=GleamSurveyPilfold/>
The core team also reported on Gleam's efforts to expand the BEAM ecosystem in a keynote talk at Code BEAM Europe 2024.<ref>{{Cite AV media |url=https://www.youtube.com/watch?v=6I0IbJtUC3U |title=Keynote: Gleam's Journey on the BEAM - Hayleigh Thompson & Louis Pilfold {{!}} Code BEAM Europe 2024 |date=2024-10-28 |last=Code Sync |access-date=2025-08-09 |via=YouTube}}</ref>
 
Developers frequentlyhave citecited Gleam’s simplicity, static typing, and user-friendly tooling as key reasons for adoption.{{cn|date=August Companies2025}} using Gleam in production environments highlight its strongThe developer ergonomics and maintainability. For example, the team behind Nestful described their motivations for rewriting the project in Gleam as driven by its clarity and ease of use.<ref>[{{Cite web |last=Nestful |title=Why I Rewrote Nestful in Gleam |url=https://blog.nestful.app/p/why-i-rewrote-nestful-in-gleam Why|access-date=2025-08-09 I Rewrote Nestful in Gleam – Nestful|website=blog.nestful.app Blog]|language=en}}</ref> AThere is a community-maintained list of companies using Gleam in production.<ref>[{{Citation |last=Harris-Holt |first=Isaac |title=isaacharrisholt/gleam-in-production |date=2025-07-31 |url=https://github.com/isaacharrisholt/gleam-in-production Gleam in Production – GitHub]|access-date=2025-08-09}}</ref> further reflects its growing presence in real-world applications.
 
In 2025, Gleam appeared for the first time in the Stack Overflow Developer Survey, where it was the 2nd "most admired" language, with 70% of users currently using the language wanting to continue working with it.<ref name=SOSurvey>{{Cite web |title=Technology {{!}} 2025 Stack Overflow Developer Survey |url=https://survey.stackoverflow.co/2025/technology |access-date=2025-08-09 |website=survey.stackoverflow.co |language=en}}</ref> 1.1% of developer respondents reported doing "extensive development work" in the language over the past year.<ref name=SOSurvey/>
In 2025, Gleam also appeared for the first time in the Stack Overflow Developer Survey<ref>[https://stackoverflow.az1.qualtrics.com/jfe/form/SV_1MNG2CYTY2AzkAm Stack Overflow Developer Survey 2025]</ref>, indicating increasing visibility in the broader software development landscape.
 
== Features ==
{{See also|Functional programming}}
Gleam includes the following features, many common to other functional programming languages:<ref name="eastman"/>
 
Gleam includes the following features.<ref name="eastman"/><ref name="techgig">{{cite web | url=https://content.techgig.com/technology/meet-gleam-a-new-programming-language-for-developers/articleshow/111258887.cms | title=Meet GLEAM: A new programming language for developers | first=Gaurav | last=Sharma | date=2024-06-25}}</ref>
* [[Result type]] for error handling
* [[Immutable object]]s
Line 94 ⟶ 97:
 
== Implementation ==
Gleam's toolchain is implemented in the [[Rust (programming language)|Rust programming language]].<ref>{{Cite web |title=gleam-lang/gleam |date=2024-05-06 |url=https://github.com/gleam-lang/gleam |access-date=2024-05-06 |publisher=Gleam}}</ref> The toolchain is a single native binary executable which contains the compiler, build tool, package manager, source code formatter, and [[Language Server Protocol|language server]].{{cn|date=August 2025}} A [[WebAssembly]] binary containing the Gleam compiler is also available, enabling Gleam code to be compiled within a [[web browser]].{{cn|date=August 2025}}
 
== References ==