News for hackers. Stuff that matters.
Re:Advancing Memory Safety by ngrilly on Tuesday October 15, 2024 @03:56PM (#41852474)
There was no backlash against Java, Swift, Kotlin and TypeScript because they are all GCed languages. You don’t need to learn anything to use them, and it’s not constraining much how you write your code. Rust is very different in that regard. You need to learn about memory ownership and borrowing, and it requires an effort and also constrains your design. I think that explains the (limited but real) backlash.
Re:Advancing Memory Safety by pjmlp on Tuesday October 15, 2024 @04:07PM (#41852586)
Happily slowly replacing C and C++ on GUI development and distributed computing systems for the last 20 years.

And yes there has been enough anti-GC hate and FUD from those that think all automatic resource management systems are born alike.

Re:Advancing Memory Safety by ngrilly on Tuesday October 15, 2024 @04:21PM (#41852700)
You’re right, I forgot about the skepticism GCed languages initially faced.
Re:Advancing Memory Safety by plorkyeran on Tuesday October 15, 2024 @04:51PM (#41852969)
When Swift first came out there was a subset of obj-c developers who hated Swift’s take on Optional. In obj-c you can freely send messages to nil and it just returns nil. In Swift you have to explicitly mark if a value is optional and handle it being nil if so, and even though this often means adding just a single character (foo?.bar), there were people who thought that Swift was just making things more complicated for no benefit.
Re:Advancing Memory Safety by bmoxb on Tuesday October 15, 2024 @07:02PM (#41854006)
I'll admit that there are certain patterns/data structures/etc. that are awkward to implement in Rust, but to write good C++ you are essentially required to think about ownership and lifetimes to some degree anyway (despite the greater lenience awarded compared to Rust and the lack of static checking). For anyone familiar with modern C++, I don't think that the shift in mental model should be too huge so the degree of backlash surprises me somewhat.