← Back to context

Comment by neonsunset

3 years ago

This article is biased in more than one way and misses a lot of nuance and aspects of GC-based languages which are not limited to pure GC and employ a lot of techniques for deterministic and semi-deterministic memory management, and various trade-offs to optimize for single/many-core and throughput/latency scenarios. In fact, many modern garbage collectors are not dissimilar to arena allocators making most of the allocations very cheap and efficient.

In addition, Rust is difficult to use for iOS as it stands today but you can for sure make it support a variety of scenarios with delegates aka callbacks/function pointers/etc. Also RAII can be supported with .drop() and more. Half of the cons are incorrect and misrepresent current state of affairs.

It also recommends defaulting to Go over C# for making a web server which my religious views compel me to publicly object to :)

Author here, you're correct that there are a lot of performance tradeoffs involved with various GC'd languages, and also correct that GC'd languages do have some support for deterministic destruction (especially with defer).

The article was trying to focus on the general approach of GC more than the GC'd languages themselves, and the article was already pretty long so I tried to keep it scoped to just developer velocity implications of the memory safety approaches themselves.

I did mention some of those aspects, for example how C# is more than just a GC'd language (it has value types to help avoid GC), and Rust is more than just borrow checking (it has RefCell). But I couldn't get as deeply into these other aspects as I would like.

(It's also pretty funny that the article's been called biased by both sides, in both directions now! Such is life.)

I also don't mean to specifically recommend Go over C#, and I see the line that gives that impression, fixing now.