Live data from Hacker News

Why I love Rust

speakerdeck.com

81–90 of 159 posts

Re: Why I love Rust

#81

Earlier quoted context omitted.

> it remains the language where so many jobs are "The" language where so many jobs are? It's one of many. > As for whether C++ has any techniques to teach that Rust does not, C++ is definitely a unique experience to go through and certainly gives a developer more insight into the actual machine they are working on in a way that few languages do. Can you name, specifically, a way in which C++ gives you "more insight i…

I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers. And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and be…

As someone who has written a lot of C++ (and essentially no rust), I think you're mischaracterizing C++. It has a lot of magic that the compiler does for you under the hood, and even more if you are using libraries.

If you want to understand what is actually happening on the machine, I do not think it is the best choice. C would be much better.

Re: Why I love Rust

#82

I want to spend at least 3-4 months learning a new language but just can't figure out if I should spent time learning Rust or Go. I am thinking more of it from a career perspective than interest.

I learned Go but now I am more curious to try out Rust. I never ever thought I would be learning so many languages including Javascript apart from Java which I know. And I am glad that because of simplicity of Go and Javascript I am much more confident of my abilities to learn new things and comfortable to try out new languages, which wasn't the case before.

Re: Why I love Rust

#83
post #78
post #34

Earlier quoted context omitted.

I think the reasoning behind the debate is that, together , they mostly obsolete C/C++. Go takes the high-end and Rust takes the low-end, and there's no niche left for C to occupy in the middle. I guess the real answer is, if you want to learn "the language that people will be using instead of C in ten years"... learn both of them.

As someone in the games industry, I don't see anybody moving towards either of these languages over C++, or really even any excitement over them. I'd be very surprised if Rust displaces C++ here, and put the chance of Go doing so at pretty much 0. If anything, the current trend is moving more low level (rather than higher level, which these languages both are), as techniques like data oriented design becoming more ma…

  > (rather than higher level, which these languages both are)
Rust should be (and is, modulo wrinkles, I mean there's no fundamental reason) as low level as it gets. What makes Rust too high-level for gamedev?

Re: Why I love Rust

#84

Earlier quoted context omitted.

I actually think you'd go far to spend 3 - 4 months learning C++. Almost every language you can likely encounter in your career will use some feature that will get introduced to you in C++, especially modern C++, and, almost any language will be easier to learn and use after first going through a C++ learning curve. Besides, C++ is still the big player, more than all others. Even Apple's new language Swift is written…

I think that is a great answer. I actually see some parallels between the relationship of Rust/C++ to Scala/Java. Both basically use the backend of the established language and provide an 'improved' language on top of it. Scala uses the JVM, and Rust uses LLVM. What is interesting is that with the release of Java 8, a lot of Scala early adopters and cutting back their investment in Scala in favor of Java (for example…

  > you can see C++ adopting pretty much the borrow checker as a tool
This may be because I'm too close to it, but the Core Guidelines are similar in ways, but also very different. Preventing data races is an explicit non-goal, for example, whereas in some ways, it's the focus of the borrow checker.

  > Rust has no major production deployments of which I am aware
Dropbox is the latest production user, as of last month. And it's serious production usage: how the bytes get stored on disk, basically the core of the whole business.

Re: Why I love Rust

#85

Earlier quoted context omitted.

I actually think you'd go far to spend 3 - 4 months learning C++. Almost every language you can likely encounter in your career will use some feature that will get introduced to you in C++, especially modern C++, and, almost any language will be easier to learn and use after first going through a C++ learning curve. Besides, C++ is still the big player, more than all others. Even Apple's new language Swift is written…

I think that is a great answer. I actually see some parallels between the relationship of Rust/C++ to Scala/Java. Both basically use the backend of the established language and provide an 'improved' language on top of it. Scala uses the JVM, and Rust uses LLVM. What is interesting is that with the release of Java 8, a lot of Scala early adopters and cutting back their investment in Scala in favor of Java (for example…

I think the new C++ tooling will be in the ballpark in much the same way that Java 8 is in the same ballpark as Scala and remove much of the impetus for moving to Rust from C++.

I think that you extrapolate from an incorrect analogy. Java is a relatively simple language (except the mess introduced by generics through type erasure), that is mostly understood by regular practitioners. Java suffered far more from the lack of modern language features than technical debt. Consequently, it benefitted from language extensions tried first in Pizza/Scala, etc.

C++, on the other hand, is a very complex language as a result of inheriting C, the lack of deprecation of misfeatures for compatibility, and perhaps questionable design choices. C++ suffers not so much the lack of language features (though support for real algebraic data types and modules would be nice), but from complexity. Complexity of the language can only be reduced by breaking compatibility.

Re: Why I love Rust

#86
post #78

Earlier quoted context omitted.

As someone in the games industry, I don't see anybody moving towards either of these languages over C++, or really even any excitement over them. I'd be very surprised if Rust displaces C++ here, and put the chance of Go doing so at pretty much 0. If anything, the current trend is moving more low level (rather than higher level, which these languages both are), as techniques like data oriented design becoming more ma…

> (rather than higher level, which these languages both are) Rust should be (and is, modulo wrinkles, I mean there's no fundamental reason) as low level as it gets. What makes Rust too high-level for gamedev?

I guess Rust has many features people are only used to seeing in high level languages - and to some people that equals "too much abstraction" which equals "slow". But the thing is - Rust's "high-level" features are all compile time with either no or very little runtime overhead.

Re: Why I love Rust

#87

Earlier quoted context omitted.

I disagree. As others have pointed out, the demand for C++ jobs is still much higher than Rust jobs, so I think my answer still stands as a way to set yourself apart when thinking of a new language to spend a few months on. Ideally, one would learn Rust and C++ both and see how they differ, and why.

> I disagree. As others have pointed out, the demand for C++ jobs is still much higher than Rust jobs, so I think my answer still stands as a way to set yourself apart when thinking of a new language to spend a few months on. It's not going to be a particularly interesting thread if everyone who works in a language that trends higher than Go on Google chimes in to say "you should learn my language instead, because it…

Well, it may teach you why its a good idea to throw away old features every couple of decades :-)

Re: Why I love Rust

#88
Good presentation with a great, artistic style. Also liked her articles about speeding Java up and "A/A testing."

Far as this one, the only correction I have is regarding the slide that says you can't write an OS in Java. Several have been written w/ JNode and JX OS coming to mind immediately. JX is my favorite given its interesting architecture is mostly compatible with high assurance requirements. Just needs a high assurance implementation. A re-write of such an architecture in Rust might be interesting. Or SPIN OS as it was done in Modula-3 before.

Re: Why I love Rust

#89

Earlier quoted context omitted.

This is good advice. I am totally confused by the Rust vs Go debate. They occupy such different spaces.

Because we have weird memories we all still remember Go claiming to be a systems programming language, which everyone took to mean "programming language you would use when you need to talk to metal" but which A) Go isn't suited for B)Rob Pike decided meant "programming language you would use to when you need to write a program" Rust sort of went public around the same time as Go which automatically "made it" a compet…

I'm going with your assessment of things as I think that's why it stays stuck in my head to a degree. The other reason is it was a modern version of Oberon: a simple, GC'd, system language ETH wrote operating systems with. Given that, I still assume an OS can be written in Go in current form or with small changes (eg runtime, FFI).

Hell, people wrote OS's in Haskell, Java, and C#. JX partly put the device drivers in Java. I'd be shocked if Go was only one that couldn't handle it.

Re: Why I love Rust

#90

Earlier quoted context omitted.

I actually think you'd go far to spend 3 - 4 months learning C++. Almost every language you can likely encounter in your career will use some feature that will get introduced to you in C++, especially modern C++, and, almost any language will be easier to learn and use after first going through a C++ learning curve. Besides, C++ is still the big player, more than all others. Even Apple's new language Swift is written…

I think that is a great answer. I actually see some parallels between the relationship of Rust/C++ to Scala/Java. Both basically use the backend of the established language and provide an 'improved' language on top of it. Scala uses the JVM, and Rust uses LLVM. What is interesting is that with the release of Java 8, a lot of Scala early adopters and cutting back their investment in Scala in favor of Java (for example…

"However, the memory safety is not a productivity improvement as more of a safety improvement."

I disagree. It frees you from chasing safety bugs and allows to invest more time in the features and that's clearly productivity win. For example rust does not suffer from compiler bugs as much as compilers written in C/C++ used to. Chrome and firefox developers spend a lot of time fixing buffer overflows and are likely to do this for many years to come. They certainly could do something more productive for everyone's benefit.

Post reply on HN