Skip to content

Pen programming language

Pen is the parallel, concurrent, and functional programming language for scalable software development, focused on software maintainability and portability.

import Core'Number
import Os'File

# The `\` prefix for λ denotes a function.
findAnswer = \(kind string) number {
  # Secret source...


main = \(ctx context) none {
  # The `go` function runs a given function in parallel.
  # `x` is a future for the computed value.
  x = go(\() number { findAnswer("humanity") })
  y = findAnswer("dolphins")

  _ = File'Write(ctx, File'StdOut(), Number'String(x() + y))



Pen aims to make large-scale software development efficient where many engineers develop software together for a long time. To realize that, it focuses on software maintainability and portability.

  • Maintainability
    • Simplicity: The language is small and easy to learn yet full featured.
    • Testability: Tests are always fast and reliable.
    • Flexibility: Developers can change codes easily without regression.
  • Portability
    • Programs written in Pen can be ported to different platforms including WebAssembly.


Minimal language

  • Its syntax and type system are small, simple, and easy to learn.
  • Yet, the language supports all the modern features.

Concurrent/parallel computation

  • The language and its runtime enables thread-safe concurrent/parallel computation.
  • For more information, see Concurrency and parallelism.

Reliable testing

  • Tests are always deterministic and fast.
  • Tests are side-effect free and independent from test environment.

No built-in system library

  • There is no built-in system library dependent on platforms.
  • Developers choose system packages suitable for their applications.
  • System packages encapsulate platform-dependent codes and side effects.
  • No other kind of package causes side effects without explicit injection.


Even more...


Pen is dual-licensed under MIT and Apache 2.0.