Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active February 14, 2025 08:57
Show Gist options
  • Save sogaiu/a0a758c241697922c7385f9cc2b8990b to your computer and use it in GitHub Desktop.
Save sogaiu/a0a758c241697922c7385f9cc2b8990b to your computer and use it in GitHub Desktop.
janet noted things - why janet

Interest

  • can break (return) from middle of function body
  • debugger support
  • embeddable
  • fast startup time
  • language name starts with a 'j'
  • less indenting than many lisps
  • macros
  • not just intel
  • peg
  • relative imports
  • repl...but also with built-in color and completion
  • single small executable
  • some clojurish things
  • some luaish things
  • straight-forward to build custom single executable (via jpm)
  • support for immutable and mutable
  • use c libraries
  • variety of platforms (linux, macos, windows)
  • wasm via emscripten

Unexpected

  • # for line comment start, not ;
  • ~ for quasiquote, not backtick
  • , for unquote
  • ; for unpack (splat), e.g. (max 1 2 3) -> (max ;[1 2 3])
  • | for short-fn (anonymous fn), e.g. |(+ 8 %)
  • @ tends to indicate mutable, e.g. @[1 2] vs [1 2], @"hello" vs "bye"

Misc

Originally noted 2020-12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment