Gleam is a functional programming language implemented in Rust, built on the Erlang virtual machine, compiled to Erlang (or JavaScript), supports interoperability with other BEAM languages ​​(such as Erlang, Elixir and LFE), mainlyFor building type-safe, scalable systems.


  • Actor-based multi-core concurrency
  • Algebraic data types
  • Erlang-style fault tolerance
  • fast compilation
  • full type inference
  • Generics
  • useful error messages
  • immutable data structure
  • No exception by default
  • no null
  • no undefined behavior
  • Reliable package management
  • Small but consistent language design
  • Zero-cost interop with Erlang, Elixir, and more

sample code

Hello, World!

import gleam/io

pub fn main() {
  io.println("Hello, world!")

Simple Web Server

import gleam/io
import gleam/bit_builder
import gleam/http/elli
import gleam/http/response

pub fn my_service(_req) {
  let body = bit_builder.from_string("Hello, world!")
  |> response.set_body(body)

pub fn main() {
  elli.become(my_service, on_port: 3000)

multithreaded hello world

import gleam/io
import gleam/int
import gleam/list
import gleam/string
import gleam/otp/process

pub fn main() {
  list.range(0, 1000)
  |> list.each(process.receive(_, 3)) // Wait for them to finish

fn start_process(i) {
  process.start(fn() {
    let message = string.append("Hello world: ", int.to_string(i))

#Gleam #Lang #Homepage #Documentation #Downloads #Functional #Programming #Language #Implemented #Rust #News Fast Delivery

Leave a Comment

Your email address will not be published. Required fields are marked *