zlacker

[parent] [thread] 5 comments
1. zozbot+(OP)[view] [source] 2026-02-02 16:33:52
> 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.

replies(2): >>Neutra+xc >>boltzm+Ku
2. Neutra+xc[view] [source] 2026-02-02 17:37:38
>>zozbot+(OP)
I don't think it's been integrated in any mainstream language though.
replies(2): >>Donald+Wf >>johnbe+kr
◧◩
3. Donald+Wf[view] [source] [discussion] 2026-02-02 17:54:20
>>Neutra+xc
I think by default Rust uses affine types, but that's about the extent of it.
replies(1): >>Neutra+Wg
◧◩◪
4. Neutra+Wg[view] [source] [discussion] 2026-02-02 17:59:18
>>Donald+Wf
I know some research languages are playing around with linear types, I wonder if we'll see it show up in some language or another.
◧◩
5. johnbe+kr[view] [source] [discussion] 2026-02-02 18:49:29
>>Neutra+xc
https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/line...

Experimental and of course one can debate whether Haskell is mainstream but I figured it merits a mention.

6. boltzm+Ku[view] [source] 2026-02-02 19:06:26
>>zozbot+(OP)
do they allow the following? >>46859860
[go to top]