Hacker Newsnew | past | comments | ask | show | jobs | submit | random_mutex's commentslogin

Magic comments have no place in a programming language

A panic in Rust is easier to diagnose and fix than some error or grabage data that was caused by an out of bounds access in some random place in the call stack


There is use after free


Majority. Parent said majority


Exactly. Use after free is common enough that you can't just assert that out-of-bounds is the majority without evidence.


actually you may be right, according to project zero by google [1], ~50% is use after free and only ~20% for out of bounds errors, however, this is for errors that resulted in major exploits, i'm not sure what the overall data is

[1] https://projectzero.google/2022/04/the-more-you-know-more-yo...


Because of compiler support


Which suggests (and I don't know this for a fact) that C++ modules are difficult to implement. D's are easy.

I would have made C++ modules be a slightly modified namespace.


C++ module implementation is a story with a lot of drama, if you ever want to read up on it.

The short summary, though, is that no toolchain yet has a bulletproof implementation, though everybody at least has enough to let people kick the tires a bit.


Most likely LLMs are better at writing react


It doesn't compile so no victory


Just the usual corporate marketing & hype.


If you delve, pun intended, into the stdlib you'll find out it's a pleasure to run away from it.


I find the error story a horror one, mainly because it's quite easy to omit an error check when the err variable is reused which leads to weird crashes and garbage data, same happens when the error is explicitly ignored.


I wouldn't call tuples or error types weird, they're just poorly designed under the pretense of keeping the language (and first of all the compiler) simple.

It's not Go who popularized channel based concurrency, it's Erlang and Elixir.


More like 60/40


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: