r/Protos • u/guillermoamolina • 12h ago
Can a dynamic language keep message semantics without paying for every message? Protos compiler update on GraalVM
One of the most interesting challenges in implementing a dynamic programming language is preserving its semantics without paying the runtime cost of every abstraction.
Protos, a prototype-based language built on GraalVM Truffle, has just improved its compiler in two areas:
- Nested control flow and indexed reads can execute inside the enclosing method without unnecessary closure activations.
- Standard Integer and Float negation now uses a specialized Bytecode DSL operation.
Dynamic dispatch, custom behavior, lexical captures, exact integer arithmetic and suspension semantics remain intact.
The implementation draws on techniques used in GraalPy while addressing Protos's own execution model.
25 new regression tests pass, and the final Protos validation reported 1,564 passing tests.
For developers interested in Smalltalk, Self, Io, Python, GraalVM or dynamic language implementation: how would you approach eliminating these abstraction costs while preserving observable behavior?
Source code: https://github.com/guillermomolina/protos
Website: https://protoslang.com