Live data from Hacker News

Rust Guide

doc.rust-lang.org

101–110 of 147 posts

Re: Rust Guide

#101
post #7

Please Rust-lang, why, oh why, do you choose to name function 'fn' and module 'mod', dont you expect to read any of the programs you write!? How is anyone supposed to read fn main(). Fun main? Fen main? F of N? Is it related to ln in println? Ive tried rust, but it just doesnt parse well in my mind. More time is spent for me parseing out the bullshit terse keywords than the meaning of the program. Ada gets this right…

Not sure why you are getting downvoted. I find it very annoying as well. Why not use brk, cont as well? Somethings are abbreviated, some things are not.

Both your comment and OPs comment have no place. The article itself is a newly published guide to Rust. OPs comment derailed the entire thread- perhaps 2/3 of the discussion is in response. Ideally, if this comment merited discussion, it would be submitted as its own thread (where it would quickly go nowhere). After all, the assertion, fn is a stupid name, is a bikeshed- a triviality offering a safe opinion for everyone. Rust isn't going to change the token. Please refrain from bikeshedding in the future.

Re: Rust Guide

#102
post #97
post #2

Honest initial impressions from my quick glance. This guide is confused. It reads at times like an informal conversation... lots of exclamations. That's pedantic, the real confusion comes from the target audience. As a programmer, I want as little cruft as possible. Get me to examples and how this differentiates from C. As a non programmer, teach me the basics of types and logic. From that thought, it's failing at bo…

Disclaimer: I've been writing programming curriculum professionally for the last three years. I do agree that it falls into the pit you describe, but I disagree that it's the style that's doing it. I think the style is fine, although there are always people it could turn off (e.g., you, perhaps). Here's an example of him falling into that pit, though: > By the way, in these examples, i indicates that the number is an…

This is good criticism. If you have time, might you consider creating an issue? https://github.com/rust-lang/rust/issues Steve reads all of the ones regarding documentation, and most likely would find it valuable.

Re: Rust Guide

#103

Earlier quoted context omitted.

Null is not a type either, and you cannot reference it in a definition. I think void is a closer match.

First you have to say if you are talking about () the type or () the value. () the type is fairly close to void in meaning. () the value is fairly close to null in meaning. Thus both comparisons are accurate, which is applicable depends on which () you are referring to. While your post is correct for () the type, if I consider () the value, your post could be transformed without loss of accuracy to: Void is not a val…

I guess you could argue that 'null' refers to the '1' in a sum type 'T + 1'. I still think 'unit' is the most precise term though, especially seeing as Rust doesn't have structural sum types. `None` is the closest we get to null.

Re: Rust Guide

#104
post #89

This language really interests me, but I would like to know some real world applications that are being used for it. While I may enjoy writing it as a hobby, could this be something that I utilized in production as well?

Game development, Application development (things like photoshop), high-load web service backends, embedded systems... basically anywhere that C++ is currently used.

The cool thing about Rust is that it guides you towards writing performant code, with a much lower likelihood of ugly bugs. This means it has a lower barrier to entry that languages like C++ or C, where you need a high level of domain specific knowledge and experience in to avoid nasty pitfalls and mistakes.

Re: Rust Guide

#105
post #81
post #9

let x = 5i; so, integers are written like complex numbers?

On the other hand, not many languages use lowercase 'i' for complex number literals, in fact I can't think of any right now.

I can't even think of a language that has first class complex numbers, let alone complex number literals.

Re: Rust Guide

#106
post #102
post #97

Earlier quoted context omitted.

Disclaimer: I've been writing programming curriculum professionally for the last three years. I do agree that it falls into the pit you describe, but I disagree that it's the style that's doing it. I think the style is fine, although there are always people it could turn off (e.g., you, perhaps). Here's an example of him falling into that pit, though: > By the way, in these examples, i indicates that the number is an…

This is good criticism. If you have time, might you consider creating an issue? https://github.com/rust-lang/rust/issues Steve reads all of the ones regarding documentation, and most likely would find it valuable.

Thanks! That's just the first instance I spotted — there were a few dozen similar things I saw after skimming for 2-3 minutes. I'll post an issue if I find time.

Re: Rust Guide

#107
post #81
post #9

let x = 5i; so, integers are written like complex numbers?

On the other hand, not many languages use lowercase 'i' for complex number literals, in fact I can't think of any right now.

Scheme and Racket use i in complex numbers, for example:

(* 2+3i 4+5i) ;=> -7+22i

Re: Rust Guide

#108
post #81

Earlier quoted context omitted.

On the other hand, not many languages use lowercase 'i' for complex number literals, in fact I can't think of any right now.

I can't even think of a language that has first class complex numbers, let alone complex number literals.

MATLAB

Re: Rust Guide

#110
post #62

+1 from me for the `curl | sudo sh` disclaimer. Even if the only thing it does is stop people complaining about it :)

Even if there were five cute disclaimers, suggesting that command would still be irresponsible. The problem is that it hurts the people who are the least knowledgeable. Anyone with a modicum of experience downloads the script first, finds out it's 475 lines, and then chooses a different method that is at least tracked by git.

At least get rid of the wholly-unnecessary sudo. At that point, it would at least be comparable to tar xvzf rust.tgz && ./rustc (still less auditable though).

Post reply on HN