1. Memory / thread safety
2. They didn't like C/C++
And often times it feels like there is more focus on problem two than problem one.
Quite a bit of idiomatic and safe (yes that does exist) C++ doesn't "translate" well to Rust without large amounts of rearchitecting. I'd focus more on converting C/C++ to languages nearing the safety of Rust but without it being such a huge shift. Like converting C++ to C#.
andrewmcwatters•22m ago
To a lesser extent, I have a problem with the protections it doesn't provide and leads developers to think they're writing safe software that in specific cases, actually just promotes silent failure through invalid data, not crashing.
I'm impressed that the language is even uglier than bad C++, which is an accomplishment in violating the beauty of reading.
Edit:
No, I think complicated C++ is also distasteful, but equally, sometimes both are just simply necessary.
Annotating specific attributes of data flow is just a requirement for types of guarantees, but I wish they weren't always done inline. It incentivizes programming language authors to squeeze more out of columns, and as a result creates quirky reading that while is more featureful or does things that aren't even possible in other languages, makes for a less than aesthetic reading experience.
I think my opinions can be handwaved away here, but I just wish we as programmers found nicer ways to give these attributes to functions, variables, and parameters.
My account is throttled by Hacker News moderators. So, I can't participate any more here for the time being. Thank you for replying to my comments.
Just expressing some petty opinions, I don't mean to start a syntax flame bait war, sorry all.
synack•18m ago
andrewmcwatters•16m ago
ggm•12m ago
mikepurvis•16m ago
In my limited rust experience, I’ve found that it does a pretty good job of using the ugliness of something like an explicit lifetime to signal to the developer and reader that the code is doing something complicated and non-obvious. Like “here’s a part where the types logic required more help than what the compiler could figure out on its own; here be dragons.”
In that way the “ugliness” is really just a manifestation of “hard things possible” and the language not hiding the underlying realities from you.
andrewmcwatters•12m ago
I agree that most of the awkwardness of reading comes from explicit declarations, but really, even if it's more verbose, I would prefer that that explicit nature is defined elsewhere rather than reading like a compact run-on sentence. (I'm hypocritically writing here, since I do this too often myself.)
malwrar•14m ago
andrewmcwatters•11m ago
I mostly expose myself to it, at the moment, through benchmark work which highlights how competitive of a good language it is.
umanwizard•12m ago
geertj•12m ago
andrewmcwatters•8m ago
But there's seemingly nowhere else to go, but maybe small Discord servers where you can meet people and share honest opinions that are real and agree to disagree without penalty.
Everyone should feel free to express harmless opinions.
Ygg2•7m ago
scoopdewoop•9m ago
I expected him to explain some core deficiencies: problems regarding the module system or multi-threading limitations, or some pathological case where latency spikes... and he said "I don't like the whitespace."
I never took him seriously again and left that company shortly after.
pizlonator•8m ago
Converting all C++ code to Rust while actually getting a safety improvement is not possible because Rust does not safely support all of the things folks do in C++ (complex cyclic object graphs with inscrutable logic deciding lifetimes, intentional races, etc).
It’s easy to think that all of those “bad” things that C++ programmers do should somehow not have been done. It’s more likely that it’s either not possible to do it any other way or that you get a worse outcome if you do it another way. The cyclic nature of compiler IRs comes to mind. As do the wacky relationships between objects in games. Complex uses of syscall ABI are another. Oh and dynamic linking. Likely there are many other examples.
The idea that an LLM would convert C to Rust without introducing a slew of problems along the way is especially juvenile. Most likely the LLM with either use the unsafe subset of Rust, or produce Rust code that doesn’t actually match the functionality of the C code (but declare premature victory thinking that it did).
adastra22•2m ago
adastra22•5m ago