lykn

Lisp Flavoured JavaScript

S-expression syntax compiling to clean, readable JS.
No runtime. No magic. Just parentheses.

lykn

;; Type-checked at dev time, zero-cost in production
(func greet
  :args (:string name)
  :returns :string
  :body (template "Hello, " name "!"))

(console:log (greet "world"))

compiled javascript

// Runtime checks in dev, stripped in production
function greet(name) {
  if (typeof name !== "string")
    throw new TypeError(/* ... */);

  const result = `Hello, ${name}!`;
  return result;
}
console.log(greet("world"));
$ cargo install lykn-cli

What Lykn Learned

  • From Scheme — the irreducible core. Five forms from which everything derives. Lykn's kernel follows this: a small set of forms mapping to JavaScript.
  • From Common Lisp — keywords (:name), the colon-package convention adapted to obj:prop. Practical macros, defmacro style.
  • From Clojure — threading macros (->, ->>), immutability by default, atoms renamed to cell. The ! convention for mutation.
  • From Erlang/LFE — multi-clause function dispatch. Pattern matching. The functional commitment. The thin-skin-over-host philosophy.
  • From RustOption/Result types, exhaustiveness checking, Cell<T> naming. Making illegal states unrepresentable.
  • From Fennel — proof that the thin-skin approach works. No runtime. Compile-time macros. Small compiler. Clean output.