Live data from Hacker News

Rust can be difficult to learn and frustrating, but it's also very exciting

influxdata.com

201–210 of 282 posts

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#201

Earlier quoted context omitted.

A shallow learning curve and cute compiler messages are the least of your problems when doing C++-caliber software. The 'small, easy language for ignorant developers' niche certainly exists, but it's already taken by Go. Rust currently provides no benefit over (modern) C++ for the problems where using Rust or C++ makes sense. (Though perhaps Rust will make it easier for layman developers to learn Rust and then transi…

Interesting! I don’t know how modern C++ deals with multi threading and shared memory etc.? Care to fill us in on the state of the art and how it’s as good as rust?

State of the art is pthreads and mutexes. The C++ and Rust wrappers for them are roughly equivalent.

Rust has some nice features for handling ownership semantics, but they are not significantly better than those in C++.

Meanwhile, Rust still lacks a normal exception handling story. Exception handling is absolutely necessary in 2018 for building real software systems.

(And even though Rust claims that errors are nicely dichotomized into "recoverable" and "not recoverable" camps, this is simply not true in the real world. There are obvious counterexamples that don't fit into this dichotomy.)

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#203
post #50

Earlier quoted context omitted.

I spent two years of my professional career with Rust doing async web services and most of it with tokio/futurrs. First you finally get comfortable with Rust and then you do the learning again with futures... I did it. It paid off. Wrote some fast and stable services with it and it is not that hard when you get to the other side. But for newcomers, be careful with references when using futures and be smart how you us…

I eventually got something working, and it was stupid stupid fast, but it definitely took a lot longer to write than I would've liked. Just waiting for the features and APIs to finalize and async/await for the ergonomics improvements. I believe in it's potential, but I'm in no hurry to use it again in it's current state.

Didn't mean though I think the current situation is that bad. What you get already is a type safe way to build async programs where the runtime is separated from the logic. I remember switching from a single threaded event loop into a work-stealing threadpool by just changing one line of code. It's very explicit and nice.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#204
post #133

Earlier quoted context omitted.

People are doing OS research in Go, and Fuchsia core components like the TCP/IP stack are written in it, regardless of what the HN crowd thinks where Go should be used. https://github.com/mit-pdos/biscuit https://github.com/ycoroneos/G.E.R.T Last version of Plan 9 was actually Inferno, which HNers keep forgetting about, which used Limbo for userspace code. Limbo uses the channel syntax later adopted by Go.

People do os research in c#

And hopefully in the future even more so.

I was quite disappointed how WinDev managed to sink Longhorn and later WP 7.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#205

I have been learning Rust on and off this year. I have been writing mostly GO for the past few years, but am moving to coding almost primarily in Rust for any new project, and porting over some older ones. Microservices, Data Layer, etc... Honestly, while not perfect, its one of the most beautiful languages I have ever come across. Plus, I have not enjoyed coding in a language this much in a while.

How does your team (E.g., the people on the hook for reviewing/supporting/contributing to your project) feel about the change? This is a big difference when moving from Go. A language that nobody calls beautiful, but is very easy for a team to contribute to and support (relative to other languages).

One more final point while I was thinking. I am a fan of both languages, Go & Rust. Go is in-fact still my recommended languages for teams, and until Rust hits a maturity level that wont change, but I am a big fan fo what rust is trying to become, I am using it for new code because of the problem fit, and I believe both ecosystems can co-exist. Go is also introducing some nice long awaited features (hopefully) in a decent way.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#206
post #78

Rust is the answer to the question "can we have speed, correctness, and expressiveness in one language?" My company has been running Rust in production for awhile now, and it's exceeded every expectation. It's fast, it's safe, and it's so productive it's hard to find a reason to use anything else. We've also found that the learning curve is, in our opinion, a bit overstated. We've ramped up several new grads on Rust…

I think the learning curve thing is depends on what's the language that you are compare it with. C++ for example, is a hard language, but the learning curve is ... progressive (rise bit by bit). Rust on the other hand, is like climbing a cliff: You're exposed to everything as soon as you start learning. That's all the Rust things (memory safety model and borrow etc) plus the rest of the knowledge that you need to lea…

C++ for example, is a hard language, but the learning curve is ... progressive (rise bit by bit).

Rust on the other hand, is like climbing a cliff

c++11+ is a hill that is so freaking high that you do not see the top.. like Olympus Mons.

honestly i do not see much difference in learning c++ or rust - in order to write good programs you should know most of the c++ standard and that's a lot to absorb.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#207

Earlier quoted context omitted.

The issue isn't exactly that it's not ready for prime time, but that it's not ergonomic at the moment. The biggest issue that you have to get used to is that pretty much everything has to be owned data, and no references passed around when constructing Future types. This can feel like it comes into conflict with the poll(&mut self) interface (in 0.1). Also, I found truly understanding the fact that returning data fro…

Wait, if I do (in any language) foo = createFuture(1) bar = createFuture(2) foo.poll() bar.poll() I would expect them to start doing work before polled, otherwise there'd be no concurrency. Do I undsrstand you correctly about polling?

You didn’t say what you understood, but nothing would happen until poll is called in Rust. And calling poll would only result in one churn of the event loop. You don’t call poll yourself, you put the future onto an event loop and it calls poll for you.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#208

Earlier quoted context omitted.

Well, tabs versus spaces is not a Python thing, that will bite you in any language eventually. Blame the VT-100 terminal. Here is the thing about indentation versus curly-braces-and-semi-colons: It boggles me that people find it acceptable to use one mechanism to communicate block structure to the compiler, and a completely different mechanism to communicate block structure to humans, and have no way to automatically…

> It boggles me that people find it acceptable to use one mechanism to communicate block structure to the compiler, and a completely different mechanism to communicate block structure to humans, and have no way to automatically check that they have the same semantics. This is a frequent source of bugs, and is entirely preventable. Strongly agree. The solution that Rust, Go and other new languages have adopted is ship…

I think Go shipping a single canonical formatting tool was an inspired decision that eliminates a massive point of contention in software teams. I expect the majority of new languages to ship a canonical format tool in the future.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#209
post #194
post #179

Earlier quoted context omitted.

But the tooling for editing the code has no support for indenting blocks as trivially as adding braces. Sure, you just run clang-format or such on the block/file, and get all the visual stuff sorted out.

What editor does not support indenting a block? In most editors I know you select the block and hit tab, or shift-tab to outdent.

Or reformat the entire file according to global formatting styles, like IntelliJ.

Re: Rust can be difficult to learn and frustrating, but it's also very exciting

#210

Earlier quoted context omitted.

Python is pretty to look at, but I hate working in white space sensitive languages. If I have to have another argument about tabs vs. spaces I am going to toss my monitor out the frickin’ window. Also, it makes autoindent in Emacs worse.

There is no such thing as white space insensitive language.

Aside from strings, isn’t C white space insensitive?
Post reply on HN