News for hackers. Stuff that matters.
Re:Memory Safe Languages in Android 13 by raggi on Thursday December 01, 2022 @09:08PM (#33825815)
> We should not bury C++ prematurely before answering the question - "what else is as fast and efficient as to replace it for OOP?"

We have an answer: Rust. It's no longer premature, bury it.

Re:Memory Safe Languages in Android 13 by aswanson on Thursday December 01, 2022 @09:25PM (#33825945)
Amen.
Re:Memory Safe Languages in Android 13 by j16sdiz on Friday December 02, 2022 @01:23AM (#33827471)
Rust is over engineered in some area, immature in other.

See how many reference types are there, how async is handled and the underspecified unsafe semantic.

For higher level tasks, I prefer a language with GC like go or java. Rust can work with references counting, but it don’t mix well with the larger ecosystem. For lower level task, the underspecified unsafe model make it worse than C aliasing problem

Re:Memory Safe Languages in Android 13 by unrealhoang on Friday December 02, 2022 @01:35AM (#33827557)
> See how many reference types are there,

2, & and &mut. What else?

Re:Memory Safe Languages in Android 13 by kaba0 on Friday December 02, 2022 @02:12AM (#33827780)
I guess parent meant ARC, RC, and the like.
Re:Memory Safe Languages in Android 13 by ilyt on Friday December 02, 2022 @06:58AM (#33829378)
I vastly prefer "just write you code serially and never worry about async then spawn 10000 goroutines" approach over async/await/Future nexus of bad ideas (just do message passing like Erlang or don't do it at all...), but I wouldn't use Go in place where I'd use Rust and vice versa, they kinda feel different (if overlapping in places) niche
Re:Memory Safe Languages in Android 13 by lanstin on Friday December 02, 2022 @11:34AM (#33832733)
It is very freeing. And one concise readable go routine doing the channel reads and the socket ops becomes your connection pool, but is as easy to understand as a Network programming 101 assignment.
Re:Memory Safe Languages in Android 13 by verdagon on Friday December 02, 2022 @01:45AM (#33827625)
How's Rust at doing OOP these days? (Assuming we're in a domain or situation where OOP is a good choice, of course.)

I would love to know about any projects that do OOP well in Rust.

Re:Memory Safe Languages in Android 13 by nicoburns on Friday December 02, 2022 @04:55AM (#33828644)
IMO Rust has most of the best bits of OOP (the ability to encapsulate functionality in an object with private fields and present a restricted public interface), without the bad bits (inheritance, and complex soups of objects all holding pointers to each other that make code flow hard to reason about)
Re:Memory Safe Languages in Android 13 by HideousKojima on Friday December 02, 2022 @02:12AM (#33827778)
Rust isn't OOP though. Structs, traits, etc. let you approximate some aspects of OOP, but not much more than plain old C does.