Re:Python, OCaml, and Machine Learning (2020)
by pjmlp on Sunday August 08, 2021 @04:14AM
(#28105048)
The main reason people complain about gc is cargo cult about stuff they don't understand.
1. Then don't do GC, use the language features for stack allocation, native heap allocation, RAII
2. Just like most malloc()/free() implementations, where you don't control how they talk with the actual OS heap management APIs, as you mention
Naturally not all GC enabled languages provide such features, so one looks at Python or Java, and thinks all GC languages were born alike.
Examples of GC languages where you can do exactly the same stuff as in C/C++/Rust, Common Lisp, Oberon, Oberon-2, Component Pascal, Active Oberon, Modula-3, D, Nim, Eiffel, C#, F#, Swift.
Also note that on my earlier comment I wasn't referring to OCaml in particular, rather languages of the list above, yet Cisco might be relatively happy with their MirageOS research.
Here is a little gem of what happens when the low level coding features of GC enabled languages are taken into the hands of people that actually know how to use them.
1. Then don't do GC, use the language features for stack allocation, native heap allocation, RAII
2. Just like most malloc()/free() implementations, where you don't control how they talk with the actual OS heap management APIs, as you mention
Naturally not all GC enabled languages provide such features, so one looks at Python or Java, and thinks all GC languages were born alike.
Examples of GC languages where you can do exactly the same stuff as in C/C++/Rust, Common Lisp, Oberon, Oberon-2, Component Pascal, Active Oberon, Modula-3, D, Nim, Eiffel, C#, F#, Swift.
Also note that on my earlier comment I wasn't referring to OCaml in particular, rather languages of the list above, yet Cisco might be relatively happy with their MirageOS research.
https://dl.acm.org/doi/abs/10.1145/3264560.3264561
Here is a little gem of what happens when the low level coding features of GC enabled languages are taken into the hands of people that actually know how to use them.
https://devblogs.microsoft.com/aspnet/grpc-performance-impro...
.NET 6 is bringing even more C++ like features into the managed world for .NET devs.