Comment

Comment by ryanrasti

> "code can only take actions via the references it has been passed"

The cool part is a move to capabilities composed in code brings back everything great about software itself: composability, encapsulation, type systems.

I've been working on this for SQL: instead of giving clients a handle to endpoints, you give them scoped query builders they can compose with (e.g., hand out a scoped `users` object and client can do `users.where(u => u.isActive()).orderBy(u => u.createdAt)`).

The result is you define a data-model (schema, computed columns, relations) and expose that instead of an endpoint per desired client query.

(if interesting: https://typegres.com/)

parent ryanrasti 2 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton