Re:Show HN: Molecule – Streaming, zero-allocation protobuf d...
by Gibbon1 on Sunday March 29, 2020 @05:52PM
(#22723106)
Thing I'd like is the ability to annotate objects and have the compiler generate a warning if the annotation is violated. As tell the compiler you expect the object to pass escape analysis. And it if doesn't the compiler will give you a bitchy warning.
Garbage collected memory allocations would be the subset of allocations for which the compiler was unable, through escape analysis or otherwise, prove that an allocation's lifetime extends past (for example) its lexical scope, in which case the analog of C auto allocation would suffice.