The stances of Jennifer

Jennifer

Eight design decisions, why they were made, and what the interpreter says when you run into one.

November 2026, by @mplx.
Based on Jennifer 0.27.0

Powered by Jennifer's Cantrip - Markdown into slide decks, https://github.com/jennifer-language/cantrip
1 / 20

The eight stances

#StanceIn one line
1One way per thingno sugar that duplicates a form
2Explicit over implicittypes, conversions, imports spelled out
3Presentation in format stringsprintf shapes, libraries transform
4Strict at boundariesbad input is an error, never garbage
5Value semanticsassignment copies, const is deep
6No shadowinga name binds once
7Topic-based, opt-in librariesnothing auto-loads
8One convention everywherethe same situation, the same shape
2 / 20

Where the reasoning is written down

Every quote and reason in this talk comes from these three files.

3 / 20

1. One way per thing

$x += 1;
$x++;
def g as string init $s >= 90 ? "A" : "B";
parse error at s1a.j:2:5: unexpected token ASSIGN ("=") in expression
parse error at s1b.j:2:4: unexpected token PLUS ("+") in expression
lex error at s1c.j:2:31: unexpected character '?'

The one form: $x = $x + 1; and if / else.

4 / 20

1. Even when the shortcut would be safer

io.print("hi\n");
runtime error at s1d.j:2:1: unknown function "print" in namespace "io"
s1d.j:2:1: warning: function `io.print` does not exist - did you mean `io.printf`? [L114]
io.printf("%s", $userInput);   # the one idiom for a dynamic string
5 / 20

1. What looks like a second way, but is not

6 / 20

2. Explicit over implicit

def f as float init 3;
io.printf("%s\n", "n=" + $n);
if ($n) { }
runtime error at s2d.j:1:1: cannot initialize float variable "f" with value of type int
runtime error at s2c.j:3:19: operator + requires numeric operands, got string and int
runtime error at s2a.j:2:5: `if` condition must be bool, got int
7 / 20

2. The explicit versions

use io;
use convert;

def n as int init 3;
def f as float init 3.0;
io.printf("%s %s\n", "n=" + convert.toString($n), "n={$n}");
if ($n != 0) { io.printf("%f\n", $f); }
n=3 n=3
3.0
8 / 20

2. Why not methods?

def y as int init time.year($t);    # not $t.year()

"The cost of OO is a different language."

9 / 20

3. Presentation, not transformation

use io;

io.printf("%d|base=2 %f|prec=2\n", 5, 3.14159);
101 3.14
io.printf("%s|case=upper\n", "abc");
runtime error at s3b.j:2:1: io.printf: option "case" not valid for verb `%s`
10 / 20

4. Strict at boundaries

io.printf("%f\n", 1.0 / 0.0);
io.printf("%f\n", 1e308 * 10.0);
io.printf("%d\n", $big + 1);         # big is the largest int
io.printf("%f\n", math.sqrt(-1.0));
runtime error at s4a.j:2:19: division by zero
runtime error at s4d.j:2:19: float overflow: 1e+308 * 10 produced a non-finite result
runtime error at s4f.j:3:19: integer overflow: 9223372036854775807 + 1
runtime error at s4e.j:3:19: sqrt(): undefined for negative input -1.0
11 / 20

4. A missing value is an error, not a default

io.printf("%d\n", $m["b"]);      # m is {"a": 1}
io.printf("%d\n", $xs[5]);       # xs is [1, 2]
runtime error at s4b.j:3:21: map has no entry for key b
runtime error at s4c.j:3:22: list index 5 out of bounds (len 2)

But 1e-400 is 0.0: a finite, correctly rounded value, not garbage.

12 / 20

5. Value semantics

use io;

def a as list of int init [1, 2];
def b as list of int init $a;
$b[] = 3;
io.printf("{len($a)} {len($b)}\n");
2 3
runtime error at s5c.j:2:1: cannot mutate contents of constant "LIMITS" (const is deep)
13 / 20

5. Why no references, ever

14 / 20

6. No shadowing

def total as int init 0;
for (def x in [1, 2]) {
    def total as int init $x;
}
parse error at s6d.j:4:5: name "total" is already defined in an enclosing scope
15 / 20

7. Topic-based, opt-in libraries

def s as string init strings.upper("x");
runtime error at s7a.j:1:22: namespace "strings" requires `use strings;`
s7a.j:1:22: warning: namespace `strings` is referenced but never declared
  (add `use strings;` or the matching `import`) [L112]
16 / 20

8. One convention everywhere

json.decode($deep);       # 2,000 levels deep
xml.decode($nested);
json.decode('{"a":');     # malformed
crypto.decrypt("aes-gcm", $forged, $key, $nonce, $none);
json.decode, too deep:  limit
xml.decode, too deep:   limit
json.decode, malformed: runtime
crypto.decrypt, forged: runtime
17 / 20

When a familiar feature is missing

ProposalTurned down forInstead
finally1: two cleanup formsdefer fs.close($f);
return $q, $r;1: structs do itreturn a struct
os.exit(1)1: same as the statementexit 1;
r"...", f"..."1: three string forms'raw' and "cooked {$x}"
parse error at r1.j:2:27: expected CATCH after `try { ... }` body, got IDENT ("finally")
18 / 20

How a proposal is judged

  1. Which stance does it touch? Is it a second way to do a job?
  2. Does it hide a cost, a conversion or a decision?
  3. Can a library function do it instead of new syntax?
  4. Turned down: an entry in rejected.md, with the arguments
  5. Shipped despite a stance: an entry in design-decisions.md
  6. Accepted: a DRAFT# in horizon.md, or an M number in roadmap.md
19 / 20

Read more

Based on Jennifer 0.27.0, November 2026.

20 / 20