Description #
Shen is a functional programming language that blends Lisp-style syntax, Prolog-like logic programming, and a strong static type system.
History #
Shen was created by Mark Tarver in 2010 as a reboot of his earlier Qi language. It’s written in itself and can be ported across multiple host languages including Python, Ruby, Java, and JavaScript.
Hello World Code #
(println "Hello, World!")
How to Run #
Option 1: Online
Shen Playground
Option 2: Local
- Download a hosted version (e.g. Shen/CL, Shen/JS):
https://github.com/Shen-Language - Example with Shen/CL:
sbcl --load shen.cl
Key Concepts #
- Lisp-like syntax
- Strong static typing with optional dynamic types
- Integrated logic programming (Prolog style)
- Functional and recursive design
- Portable to multiple backends
- Pattern matching and tail recursion
- Macros and metaprogramming
- Interactive REPL
- Small core with extensibility
- Compiles to bytecode or JavaScript
Try It Online #
https://shen-language.github.io/tryshen
Fun Facts #
- Shen’s type system is based on sequent calculus and can model dependent types.
- It can be transpiled into over 10 major host languages, making it uniquely portable.
- Shen’s name means “spirit” in Chinese and reflects its focus on abstraction.