Hasty Briefsbeta

Bilingual

Why Janet?

3 hours ago
  • #janet
  • #lisp
  • #programming
  • Janet is a Lisp dialect that is simple to learn in an afternoon, with a core of only eight instructions and a small standard library.
  • Janet programs can be compiled into native executables that statically link the runtime, making them distributable without requiring Janet installation.
  • Janet excels at parsing text using parsing expression grammars instead of regular expressions, which are more powerful and can handle non-regular languages.
  • Janet has a third-party library (sh) for a shell scripting DSL that simplifies expressing pipes and redirects, enhancing its utility for command-line apps.
  • Janet is easily embeddable as a C library, allowing it to be integrated into other programs or websites for scripting interfaces.
  • Janet offers both mutable and immutable collections with clear value and reference semantics, including immutable composite values in its standard library.
  • Janet supports macros, enabling compile-time code manipulation and the creation of referentially transparent macros, which is a unique and fun programming experience.
  • Janet allows passing values from compile-time to run-time through serialization, enabling state snapshots and side effects at compile time.
  • Janet features a syntax with pervasive parentheses, distinct brackets for lists and tables, mutable literals prefixed with @, and shorthand notations for functions and spreads.
  • Janet prioritizes comfort over tradition, using modern names (e.g., first, fn) instead of traditional Lisp terms and including first-class Booleans, distancing itself from linked lists.