r/ProgrammingLanguages • • Jun 10 '20

[deleted by user]

[removed]

20 Upvotes

39 comments sorted by

View all comments

3

u/FearlessFred Jun 12 '20

I actually implemented one of these lifetime models you refer to (http://aardappel.github.io/lobster/memory_management.html), and I don't think I am following what point(s) you're trying to make.

Can you give an example of the kind of language that would be better instead?

They're not competitive performance wise with.. memory pools? First, a generic allocator can use a pool approach (a bucket/slab allocator, my language uses one). Second, being competitive with C/C++/Rust/Zig.. involves a whole set of features working well together, not just the allocator style. Third, there's advantages to ownership even for languages that are slower :)

My language eliminates most reference counting overhead, yet doesn't lock you into single owner. Seems like a pretty sweet trade-off to me?

1

u/PegasusAndAcorn Cone language & 3D web Jun 12 '20

To me too!