Hacker News new | ask | show | jobs
by pjmlp 2238 days ago
JITs already do this kind of thing, it is called escape analysis, it is just quite hard to get right.

Also many GC based languages are adding some form of linear types, so that you can still enjoy the productivity of having a GC around, while being able to get hold of these kind of tools.

https://github.com/apple/swift/blob/master/docs/OwnershipMan...

https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types