Re:Go memory ballast: How I learnt to stop worrying and love...
by kqr on Monday December 02, 2019 @01:53AM
(#21680405)
C# is "a GC language" and generally has quite good support for explicit lifetime management, through stack allocated value types as well as memory pools and whatnot.
Re:Go memory ballast: How I learnt to stop worrying and love...
by pjmlp on Monday December 02, 2019 @07:15AM
(#21681743)
Here is a list of GC language that provide capabilities to handle allocations outside GC heap,
Mesa/Cedar, Modula-2+, Modula-3, Oberon, Oberon-07, Oberon-2, Active Oberon, Zonnon, D, Nim, C#, VB.NET, F#, Standard ML (with MLKit), Eiffel, Swift.
Just the list I tend to keep in mind, there are quite a few others.
Re:Go memory ballast: How I learnt to stop worrying and love...
by mister_hn on Monday December 02, 2019 @01:21AM
(#21680247)
I think you might want to try modern C++ (C++17 and the soon to be released C++20), if memory allocation and lifetime is your major concern.
The language has improved itself so much that it's now a better syntax and verbosity
Re:Go memory ballast: How I learnt to stop worrying and love...
by fileeditview on Monday December 02, 2019 @01:33AM
(#21680302)
I think he wants a GCed language that also allows manual memory alloc/dealloc. Doesn't D offer both?
Re:Go memory ballast: How I learnt to stop worrying and love...
by mister_hn on Monday December 02, 2019 @03:05AM
(#21680692)
yeah but what's the point of a GC when you want to do manually the operations?
Re:Go memory ballast: How I learnt to stop worrying and love...
by Dylan16807 on Monday December 02, 2019 @03:27AM
(#21680797)
So that you can put the hottest 5% under [semi-]manual control and let the GC do the rest.
Re:Go memory ballast: How I learnt to stop worrying and love...
by stiray on Monday December 02, 2019 @03:47AM
(#21680870)
Exactly this. :) I am quite familiar with c++ (no expirience i D) but for fast little projects go is great, I wouldnt mind having more control over GC.
Re:Go memory ballast: How I learnt to stop worrying and love...
by manigandham on Monday December 02, 2019 @07:00AM
(#21681677)
C# provides this now with all the new Memory and Span constructs to manage memory seamlessly. You can build your own memory pools and allocators to manage lifetimes.
What does annoy me is that GC languages doesnt provide option of allocations that are not handled by GC but still uses language primitives and/or privide option to deallocate them manually. Dev. could decide should they leave alocation to GC or handle them on their own. I would certanly love it, in most programs that I write I know exactly what the lifetime of objects is and I am leaving them to the GC just due to missing any other option.