Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Bongo Bill
Jan 17, 2012

unsafe {} doesn't mean the code within is not safe; rather, it means that the memory safety of the block is promised by the programmer, instead of the compiler. The programmer might be wrong, of course. If you are trying to do something that you know is fine, but the compiler isn't smart enough to prove, that's exactly when you should be using unsafe {}. But it's probably wiser to implement it in such a way that the compiler doesn't need to trust you, wherever possible.

Adbot
ADBOT LOVES YOU

Bongo Bill
Jan 17, 2012

sarehu posted:

Seriously? Online forums have had "rules" that are about "be nice to people, don't be a dick," since forever, for example, and they read a lot differently when they aren't full of dog-whistles and designed to reinforce a certain political thesis about how the world is.

Online forums, noted bastions of professionalism and decency.

Bongo Bill
Jan 17, 2012

Rust's memory management is based on the observation that types aren't the only things you can enforce at compile-time. The work of ensuring memory consistency is still being done; it's just that a large part of that work was put into the compiler, and the part that remains for the end-user to do takes the form of appeasing the compiler.

Bongo Bill
Jan 17, 2012

sarehu posted:

Or the end user could understand what's going on. You should be able to "see the allocations" -- they're as visible as they are in C++.

Well, yes. I only mean that the fact that having a machine checking your work makes it easier.

Bongo Bill
Jan 17, 2012

Stinky_Pete posted:

Hello, I started learning Rust because this game/graphics engine called Amethyst uses it. I've been going through Rust by Example and I'm totally in love, but I was just wondering, who is responsible for Cargo staying up? Is it Mozilla?

Bet you could email them to find out.

Adbot
ADBOT LOVES YOU

Bongo Bill
Jan 17, 2012

ADTs are a good enough feature that I'd be willing to put up with a vastly worse language than Rust in order to be able to use them.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply