Skip to content

Hylo

A Systems Programming Language
All in on Value Semantics and Generic Programming

Join the Hylo Community

Connect with developers and contributors

Compiler

  • Compilation using LLVM
  • Novel techniques for compiling generics with coherence
  • Caching and serialization of the compiler’s program state
  • C interop research
Who Owns the Contents of a Doubly-Linked List? PDF Dimi Racordon 2025-09
High-Fidelity C Interoperability in Hylo PDF Ambrus Tóth 2025-06
Debugging Hylo PDF Tudor-Stefan Magirescu 2025-06
On the State of Coherence in the Land of Type Classes PDF Dimi Racordon, Eugene Flessele, Cao Nguyen Pham 2025-02
Type Checking with Rewriting Rules Dimi Racordon 2024-10
Use Site Checking Considered Harmful Dimi Racordon, Benjamin Chung 2024-10
Method Bundles Dimi Racordon, Dave Abrahams 2024-10
Borrow checking Hylo PDF Dimi Racordon, Dave Abrahams 2023-10
Existentialize Your Generics PDF Dimi Racordon, Matt Bovel, Hamza Remmal 2022-06
Implementation Strategies for Mutable Value Semantics PDF Dimi Racordon, Denys Shabalin, Daniel Zheng, Dave Abrahams, Brennan Saeta 2022
Toward a Lingua Franca for Memory Safety PDF Dimi Racordon, Aurélien Coet, Didier Buchs 2022
Native Implementation of Mutable Value Semantics PDF Dimi Racordon, Denys Shabalin, Daniel Zheng, Dave Abrahams, Brennan Saeta 2021-06
A Formal Definition of Swift's Value Semantics PDF Dimi Racordon 2020-11

Are you interested in research collaboration — as a student, professor, or independent contributor? Learn about our open research topics, or suggest a new topic!

Concurrency Hylomorphism Lucian Radu Teodorescu ACCU 2024-07
Keynote Hylo: The Safe Systems and Generic-programming Language Built on Value Semantics Dave Abrahams C++ on Sea 2024-07
HyloDoc: A Documentation Compiler for Hylo Ambrus Tóth C++ on Sea 2024-06
Borrow checking Hylo Dimi Racordon IWACO 2023-05
Concurrency Approaches: Past, Present, and Future Lucian Radu Teodorescu ACCU 2023-04
Val: A Safe Language to Interoperate with C++ Dimi Racordon CppCon 2022-09
Value Semantics: Safety, Independence, Projection, & Future of Programming Dave Abrahams CppCon 2022-09
An Object Model for Safety and Efficiency by Definition Dave Abrahams CppNorth 2022-07
Keynote A Future of Value Semantics and Generic Programming Part 1 Dave Abrahams C++Now 2022-05
Keynote A Future of Value Semantics and Generic Programming Part 2 Dave Abrahams, Dimi Racordon C++Now 2022-05
Structured Concurrency Lucian Radu Teodorescu ACCU 2022-04
Rust & Safety at Adobe with Sean Parent Sean Parent ADSP #160 2023-12-15
Sean Parent on Hylo! (Part 2) Sean Parent ADSP #138 2023-07-14
Sean Parent on Hylo (vs Rust)! Sean Parent ADSP #137 2023-07-07
Val and Mutable Value Semantics Dimi Racordon CppCast #352 2023-01-20

Even though the compiler and standard library are still in their early stages, we can already show some advanced examples of Hylo code that you can try out on Compiler Explorer.

GlobalBinding.hylo
public fun main() {
precondition((x + y) == 42)
}
public let (x, y) = (40, 2)
Geometry.hylo
/// The orientation of a 2D vector.
public type Angle: Deinitializable {
/// The value of `self` in radians.
public var radians: Float64
/// Creates an instance with its value in radians.
public memberwise init
/// Creates an instance with its value in degrees.
public init(degrees: Float64) {
&self.radians = degrees * Float64.pi() / 180.0
}
/// The value of `self` in degrees.
public property degrees: Float64 {
let { radians * 180.0 / Float64.pi() }
inout {
var d = radians * 180.0 / Float64.pi()
yield &d
&self.radians = d * Float64.pi() / 180.0
}
}
/// A copy of `self` wrapped within the interval `[0, 2 * pi[`.
public fun wrapped() -> Self {
// inefficient implementation until
// `Float64.remainder(dividingBy:)` is available
var r = radians.copy()
if r < 0.0 {
while r < 0.0 {
&r = r + 2.0 * Float64.pi()
}
} else {
while r >= 2.0 * Float64.pi() {
&r = r - 2.0 * Float64.pi()
}
}
return Angle(radians: r)
}
}
public fun main() {
var a = Angle(radians: .pi())
inout d = &a.degrees
precondition(d == 180.0)
&d = 0.0
precondition(a.radians == 0.0)
&a.radians = 2.0 * Float64.pi()
precondition(a.wrapped().radians == 0.0)
}
CustomMove.hylo
type A: Deinitializable {
public var witness: Int
public var x: Int
public init(x: sink Int) {
&self.x = x
&self.witness = 0
}
}
conformance A: Movable {
public fun take_value(from source: sink Self) {
set {
&self.x = source.x
&self.witness = 0
}
inout {
&self.x = source.x
&self.witness += 1
}
}
}
public fun main() {
var s = A(x: 1)
&s = A(x: 2)
&s = A(x: 2)
precondition(s.x == 2)
precondition(s.witness == 2)
}

See more examples in the compiler test suite.