zlacker

[return to "My fast zero-allocation webserver using OxCaml"]
1. boltzm+wy[view] [source] 2026-02-02 14:51:30
>>noelwe+(OP)
it's a massive crime that decades into FP, we still don't have a type system that can infer or constrain the amount of copies and allocations a piece of code has. software would be massively better if it did - unnecessary copies and space leaks are some of the most performance-regressing bugs out there and there simply isn't a natural way of unearthing those.
◧◩
2. zozbot+hT[view] [source] 2026-02-02 16:33:52
>>boltzm+wy
> infer or constrain the amount of copies and allocations a piece of code has

That's exactly what substructural logic/type systems allows you to do. Affine and linear types are one example of substructural type systems, but you can also go further in limiting moves, exchanges/swaps etc. which helps model scenarios where allocation and deallocation must be made explicit.

◧◩◪
3. Neutra+O51[view] [source] 2026-02-02 17:37:38
>>zozbot+hT
I don't think it's been integrated in any mainstream language though.
◧◩◪◨
4. Donald+d91[view] [source] 2026-02-02 17:54:20
>>Neutra+O51
I think by default Rust uses affine types, but that's about the extent of it.
[go to top]