Live data from Hacker News

Rust is mostly safety

graydon2.dreamwidth.org

221–230 of 474 posts

Re: Rust is mostly safety

#221
post #20

The original Rust author make great points about safety. I think this new thrust on marketing emerges from Rust Roadmap 2017 which puts Rust usage in industry as one of the major goal. Currently Rust is about Go's age but nowhere close in usage. As the roadmap says "Production use measures our design success; it's the ultimate reality check." I agree with that.

> As the roadmap says "Production use measures our design success; it's the ultimate reality check." I agree with that. I don't. It's a measure of the overall success. Design is but a small part of that. Community, outreach, corporate back up… play a huge part in the success of a language. Go is a wonderful example: doesn't even provide parametric polymorphism (generics), and they got away with that! Feels like Googl…

Google backup is really more towards Dart when compared to Go. Dart has much more Google contributors vs Non-Google. Dart Dev summit seems to be totally sponsored by Google and it even had free entry whereas Gophercon is independent of Google.

Though Dart has generics but not much usage in industry.

Re: Rust is mostly safety

#223
post #204
post #160

Earlier quoted context omitted.

Sure, not all type systems are created equal. And there are indeed type systems that can catch more errors than Haskell's (although that usually comes at the price of losing type inference). But I read OP's point as "Well, you can never catch all programming errors with PL_feature_X, so why even bother." And my point is simply that a lot of PL features make formerly hard things easy and thus allow you to go faster an…

You completely misunderstood what he was trying to tell you.

There was nothing interesting in what he was trying to say.

Yes, no programming language perfectly eliminates all classes of unsafety. But that's no reason to let the perfect be the enemy of the good! "The issue with safety is..." no issue at all. Being safe in a bunch of problem domains (Rust) is still strictly better than being safe in very few if any of them (C).

Re: Rust is mostly safety

#224
post #146

Earlier quoted context omitted.

I don't see a split here. I know lots of cool ideas have been posted to Hacker News lately, that showcase something possible in future versions of Rust. But I seriously hope people keep these libraries as showcases, not production-quality tools. I'd say this nightly/stable split is a bit out of proportion. In 2017 we'll get Tokio and lots of Tokio-ready libraries. Some of them already work and compile with stable Rus…

Tokio runs entirely on stable, though 1.0 won't happen until some language changes land. Diesel does work on stable today, but its nightly features will be on stable in five weeks with 1.15.

> Tokio runs entirely on stable, though 1.0 won't happen until some language changes land.

Are you talking about impl Trait or some other language changes?

Re: Rust is mostly safety

#225

Earlier quoted context omitted.

Sometimes you want it to be lossy, but not most of the time, and yet there is no choice. I had a bug caused by that, that's why I remember it. Silent explicit type conversions are essentially unsafe.

What do you mean by "silent explicit type conversion"? If you said "silent type conversion" I'd read that as "implicit type conversion". But you said "explicit", which means you've got it very clearly in your code that you're doing a type conversion (to a smaller type), so what's silent about that?

Silent in terms of compiler not complaining.

Re: Rust is mostly safety

#226

Rust is about letting the compiler slap you for your mistakes in the privacy of your own Xterm, instead of letting Jenkins do it 10 minutes later, in front of all your co-workers.

Maybe it will change in future. Currently slaps seems so hard that developers are still smarting and not producing code for production

Re: Rust is mostly safety

#227
post #165

How is Rust better than and different from D? https://dlang.org/ Does anyone concerned about security use D?

There are a lot of reasons. There's a terrific in-depth discussion of D on the Rust subreddit from a few weeks ago. https://www.reddit.com/r/rust/comments/5h0s2n/what_made_rust...

Re: Rust is mostly safety

#228

Earlier quoted context omitted.

Go has one very significant advantage over Rust: Simplicity. Reading someone else's Go code is such a breath of fresh air compared to reading someone else's C++ code (or god forbid, Haskell). Having a standard formatting further enhances this. I feel like this aspect of Go is not given enough weight. It's a huge benefit to large software projects and large software companies. I also suspect that this may be why the G…

> re: generics: If they aren't implemented carefully, they could unacceptably complicate the language. Can you explain why? For example, simple generics which could be implemented as regex doesn't seem to complicated? Am I missing something? For example (in Java), an ArrayList could be turned into a StringArrayList by a basic internal pre-processor.

How do you handle error messages? Can you make functions, methods or their parameters generic? Can you dynamically link generics?

Re: Rust is mostly safety

#229
post #224

Earlier quoted context omitted.

Tokio runs entirely on stable, though 1.0 won't happen until some language changes land. Diesel does work on stable today, but its nightly features will be on stable in five weeks with 1.15.

> Tokio runs entirely on stable, though 1.0 won't happen until some language changes land. Are you talking about impl Trait or some other language changes?

impl Trait is what I'm thinking of, yeah.

Re: Rust is mostly safety

#230
post #226

Rust is about letting the compiler slap you for your mistakes in the privacy of your own Xterm, instead of letting Jenkins do it 10 minutes later, in front of all your co-workers.

Maybe it will change in future. Currently slaps seems so hard that developers are still smarting and not producing code for production

Rust is being used in a number of places in production for a wide variety of things: https://www.rust-lang.org/en-US/friends.html
Post reply on HN