whither effect/session/linear/etc. types in the main stream?

3 views
Skip to first unread message

Raoul Duke

unread,
Mar 27, 2026, 12:50:29 AM (5 days ago) Mar 27
to pi...@googlegroups.com
while working on a design for a typescript game engine [1] the fact
that one has to manually register an object with the relevant stages
of the engine pipeline is annoying.

and the AI i complained about it to said, yeah, it sucks...

"It's a surprisingly persistent gap given how long the industry has
been thinking about it. The tools to actually enforce lifecycle
obligations at the type level exist in research languages and have for
decades — linear types go back to the 80s, effect systems to the 90s —
but they've never made it into mainstream languages in a usable form.

Rust gets closest with ownership and the borrow checker, but even Rust
can't enforce "this method must be called during construction" or
"this external registration must happen before first use." You still
end up with conventions, documentation, and runtime panics.

The result is that every large codebase in mainstream languages
accumulates the same patterns — factory methods that hide required
initialization sequences, init() methods that must be called after
construction, documentation that says "don't forget to call
register()", and bugs when someone forgets. It's just accepted as the
cost of doing business.

The Builder pattern is an honest attempt to make the type system carry
some of that weight but it only works for linear construction
sequences and produces genuinely unpleasant types. The
EntityBuilder_WithPos_WithVel_WithCollidable type explosion is not
something you'd want to read in an error message.

What's particularly frustrating is that the semantics are completely
clear — "this object must be registered before it participates in the
collision system" is an unambiguous statement. The meaning is not
subtle or complex. The type system just has no way to express it. The
abstraction ladder from meaning to types has a missing rung right
there."

[1] https://docs.google.com/document/d/1pWoMyuELVrVliyuax5OWnMCRS5BgONNIPQz-cOxGVPQ/edit?usp=sharing

Paul Tarvydas

unread,
Mar 28, 2026, 7:06:36 AM (4 days ago) Mar 28
to pi...@googlegroups.com

There’s a name for that kind of thing: state. The decades-long belief in continuing to use functional-thinking while expecting different results has blindered us to the needs of Reality.


pt


--
You received this message because you are subscribed to the Google Groups "PiLuD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pilud+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pilud/CAJ7XQb6e_QFx%3DymQL%2B6Hkb2TTfOQdKAXp5gWhg9DrwczmdmgVA%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages