News for hackers. Stuff that matters.
Re:Why use Rust on the back end? by paxys on Monday March 20, 2023 @05:06PM (#35238713)
Wanted to point out one potential side effect of their primary point. If you have a team of system developers fully proficient in Rust, and the next task is to build some middleware web API, Rust could seem like an obvious choice, because everyone on the team already knows it and loves it. However, unless you plan on having these developers work on web APIs forever, there is now a huge barrier for future hiring because none of the millions of developers out there with experience in C#, JS, Java, Go, Python and the like are qualified to work on this simple backend. You have narrowed down your hiring pool to expert Rust developers even though all you need is a new college grad who can start a Flask server.
Re:Why use Rust on the back end? by steveklabnik on Monday March 20, 2023 @05:10PM (#35238773)
At Oxide, we do "web API layer" stuff in Rust. We also don't require that candidates be Rust experts, though obviously experience helps. Many of those people who are "proficient in C#, JS, Java, Go, Python and the like" can absolutely write Rust, even if there is some slowness at first.

You have to be willing to believe that and consider it when hiring, of course, which some organizations may reasonably not be willing to.

Re:Why use Rust on the back end? by whitepoplar on Monday March 20, 2023 @05:17PM (#35238891)
How long would you say it takes your average, competent developer to become proficient in Rust? In your experience, what's the best path to learn Rust in 2023?
Re:Why use Rust on the back end? by steveklabnik on Monday March 20, 2023 @05:32PM (#35239081)
> How long would you say it takes your average, competent developer to become proficient in Rust?

I think it's exceedingly difficult to make such a broad generalization. There's a number of factors here at play, but for example, I think the struggles of a Rubyist learning Rust are very different than a C developer learning Rust, and are very different than someone who's proficient with both who know Rust.

It's also hard because there's also just other random factors. There's a semi-common experience where people try Rust, think it's too hard, quit, and then come back 3 or 6 months later, try again, and are completely unstuck. Sometimes it takes coming back two or three times. Do you count all of that dead time? Something in there helped, but it's unclear what, or why this affects some people.

Another theme of stories I've heard is a sort of Golidlocks situation about how "right" you think the compiler is. Some folks have the attitude that the compiler is to be seen, not heard, and should stop nagging them about things. Those folks tend to really struggle with Rust, even if they have lots of relevant experience previously. Likewise, some folks trust the compiler so completely that they will lose a bunch of time when a compiler suggestion leads them down the wrong path. Luckily, that problem is easier to fix than the former one, and is rarer and rarer every day. But these sorts of attributes are completely separate than what we think of when we talk "competency" of devs.

> In your experience, what's the best path to learn Rust in 2023?

This sounds tautological, but bear with me: it's whatever path gets you to learn Rust. That sounds trite but what I mean is that different people have different needs (see above) and so need different things. There is no one best way. For some people, the book works really, really well. For others, they either hate the writing style, or the pace, or just something ineffable. I wouldn't say that they're wrong for that, just that they'd be served by different strategies.

What I will say is that "I know other languages, I can just kinda start coding and pick it up" tends to not work for almost anyone. You either need to be quick to ask questions from the community, or be willing to do some reading, or you may run into some struggles that will take you longer to overcome than if you were willing to get some help. Folks who take advantage of community resources, broadly speaking, tend to do better than folks that think they can write some code and learn solely through errors, as Rust's semantics are just unique enough that some background and explanation can be extremely helpful.

Re:Why use Rust on the back end? by DangitBobby on Monday March 20, 2023 @11:46PM (#35242331)
> There's a semi-common experience where people try Rust, think it's too hard, quit, and then come back 3 or 6 months later, try again, and are completely unstuck.

This was my experience, I came back a year or two later, and both I and the language had improved. I'm not sure who improved more, but whatever happened I'm really enjoying the language now.

Re:Why use Rust on the back end? by arch-ninja on Monday March 20, 2023 @05:26PM (#35239011)
6 months if you're a college-sophmore-level student doing it part-time (my own experience + numbers), I'd estimate 3-4 weeks if you were spending more than 3hrs/day on it and knew 2 other languages.
Re:Why use Rust on the back end? by oneplane on Monday March 20, 2023 @05:44PM (#35239220)
That would be my estimate as well. I've seem some porting between Go and Rust (both ways) where either way an experienced developer with some multi-language knowledge got up and running in a day, writing useful code in a week and being proficient enough to do normal sprint work in about another week.

It mostly depends on what you have in you brain, what you see when you look at code, and if you understand why you do what you do rather than repeating a trick and hoping it works, and I suppose that is a combination of theory and experience.

Re:Why use Rust on the back end? by eYrKEC2 on Monday March 20, 2023 @06:29PM (#35239738)
My current employer has a web backend and CLI in Rust. I joined the company having only dabbled in Rust, but having a background in C++, python, javascript, and verilog. It took me a month to feel able to do things and 3 months to feel reasonably comfortable. Still haven't mastered it after 1.5 years. Certain pieces of the rust ecosystem have their own learning curve such as diesel orm.
Re:Why use Rust on the back end? by DoesntMatter22 on Monday March 20, 2023 @10:51PM (#35241977)
I was using Chat GPT to learn rust but most of the examples it generated were pretty old (mysql 4 vs now at 21).
Re:Why use Rust on the back end? by joshka on Tuesday March 21, 2023 @01:09AM (#35242769)
As a fellow rust n00b, one of the big problems I'm seeing with using ChatGPT to generate rust is that it often doesn't have a good model of ownership semantics. This has caused me lots of burnt time working through plausible but not accurate solutions to problems.
Re:Why use Rust on the back end? by andrewstuart on Tuesday March 21, 2023 @07:30AM (#35244827)
You’re saying AI has trouble learning Rust too?
Re:Why use Rust on the back end? by joshka on Thursday March 23, 2023 @09:44AM (#35274679)
Lol. Yup. Though it’s possible that it was overfitting its response to my noob questions. I’ve had better luck since.
Re:Why use Rust on the back end? by joshka on Tuesday March 21, 2023 @01:16AM (#35242790)
The tokio tutorial is (mostly) pretty well written and worth a read.

There's a lot of good docs like rust-by-example and the rust book, but for my liking, those both seem to spend too much time on each topics rather than distilling the info into smaller denser topics. This is probably great for newer developers but more difficult for someone that wants to learn the 30 second version of something rather than the 5 minute version. It's possible that punching these books through a GPT prompt like "Extract the salient points from the following:" might help?

Re:Why use Rust on the back end? by makestuff on Monday March 20, 2023 @05:24PM (#35238988)
Not sure if rust is significantly harder to learn than Go, but as a Java dev I was able to pickup go and make contributions in around a week or so. Yeah I was slower, but we had some really good Go devs who had all of the tooling and packages laid out with best practices. This made it easy for new devs to jump into it.

I think the issue happens when you have a new rust/go/javascript/etc. dev trying to setup a project for the first time.

Re:Why use Rust on the back end? by moonchrome on Monday March 20, 2023 @05:29PM (#35239047)
Yes Rust is significantly harder than go. It's diametrically opposite if there was a circle of complexity.

I honestly have no clue how someone without low level experience (eg. never did systems level programming) even approaches Rust.

The ownership model makes sense to me but if I had to grok manual memory management and rust abstractions on top of it at the same time I think I would be unable to contribute even trivial stuff for a month.

Oh and coming from a dynamic language background at that ?

Not saying can't be done just saying time till contributing is probably weeks-months.

With go it's probably days.

Re:Why use Rust on the back end? by iudqnolq on Monday March 20, 2023 @05:55PM (#35239335)
> I honestly have no clue how someone without low level experience (eg. never did systems level programming) even approaches Rust.

In my personal experience you do this by writing your programs in such a way as not to require complex ownership. I had an easy time writing web services where the only cross-request shared state was a database handle. I had a hard time when I had to write a websocket document sync serverwhere I needed per-document global state shared between all the handlers, and I eventually gave up and moved to a model where a language with an easier concurrency story called rust code.

Re:Why use Rust on the back end? by phamilton on Monday March 20, 2023 @07:17PM (#35240239)
This. Implementing an http endpoint is pretty straightforward. Newcomers may struggle with copy vs reference semantics (and that just takes time), but otherwise it's not too different from other statically typed http work. You define your input/output structs, you grab a database connection, you perform a query, and return it. No lifetimes. No Arcs or Mutexes or Rc or RefCell.

We generally consider our rust backend as two parts: application code and library code. We intend for our application code to be approachable by full stack developers and not require deep rust expertise to use. Our library code can be a bit more complicated, and there we see a bigger ramp up and frankly some self selection among our team and that's fine.

Re:Why use Rust on the back end? by nicoburns on Monday March 20, 2023 @06:38PM (#35239841)
> I honestly have no clue how someone without low level experience (eg. never did systems level programming) even approaches Rust.

I started by reading the Rust Book. It explains most of the low-level concepts. It took me about a week of mostly just learning and experimenting, and another ~3 weeks until I had an MVP of my system. But from there it was just another 2 months until I had a full system written and in production, which it would probably have taken in another language anyway (as the project involved a lot of trial and error reversing a (simple but) only partially documented format).

Perhaps it helps that I came from JavaScript where a lot of the abstractions are similar.

Re:Why use Rust on the back end? by molodec on Monday March 20, 2023 @07:10PM (#35240169)
Curious what modern schools teach in Computer Science programs. I went to Salisbury State University 17 years ago, and we had classes on assembly language, system programming and operating systems where we used C, algorithms classes with assignments in C++, computer graphics, which of course also C++. My professional experience working in industry was primarily in Java, but also some C, Python, Ruby. Learning Rust was not without a challenge, but having a lot of programming in C/C++ in school more than 10 years ago helped a lot. My assumption that all software engineers who have university degree should have some experience in system programming.
Re:Why use Rust on the back end? by sophiabits on Monday March 20, 2023 @07:35PM (#35240422)
At my university the language used for teaching was predominantly Java, with Python or C# used in some papers.

There was an optional operating systems paper which had you writing some assembly to run on an in-house RISC system [1], but a small % of CS+SE students took that paper.

I think they’re trending towards using Python for most papers now. Not unreasonable for a paper on data mining or web development, but there’s definitely something being lost where students don’t /need/ to understand how the computer’s working in order to get a passing grade, so there’s no real incentive to dig deeper for the average student.

[1] https://wramp.wand.nz/

Re:Why use Rust on the back end? by tialaramex on Monday March 20, 2023 @08:50PM (#35241091)
The University I work for teaches Java in Programming I (the mandatory introductory language) for Computer Scientists, and teaches them some C in Programming II and then a functional language, typically Haskell, and potentially some Rust, Typescript, whatever by the third year as some of the students will be pursuing Theory. The Electronics students learn C at the beginning meanwhile. Students elsewhere in the university learn mostly Python and R.
Re:Why use Rust on the back end? by coldtea on Monday March 20, 2023 @07:36PM (#35240435)
>I honestly have no clue how someone without low level experience (eg. never did systems level programming) even approaches Rust.

Far easier than the way anyone without low level experience (which meant almost everybody starting out) approached learning C and C+, back when Java, C#, Python, Perl etc were not yet a thing, and you got either got directly into C/C++ or started with PASCAL and BASIC if you were lucky. Oh, and no IDES, internet, stack overflow, or forums either...

Re:Why use Rust on the back end? by moonchrome on Tuesday March 21, 2023 @07:06AM (#35244672)
I mean I wouldn't recommend anyone do that either. Doubt you'll find many C++ roles taking people without experience either.
Re:Why use Rust on the back end? by tptacek on Monday March 20, 2023 @07:02PM (#35240083)
Go is garbage collected. It is significantly easier to write than Rust --- it's not just easier to learn, but easier for experts to write, because it's doing a bunch of work for the developer that Rust doesn't.

On the other hand, if you need manual memory management (for performance reasons, or because you're doing something bare-metal), you'll be fighting Go's garbage collector, and Rust has conveniences for manual memory management that Go doesn't.

Re:Why use Rust on the back end? by DominoTree on Monday March 20, 2023 @07:18PM (#35240243)
Go is quite arguably a worse language though, including certain fundamental cornerstones of modern web development. Ever tried to see what fields a JSON payload contains in an "idiomatic" way before casting it to a type in Go? It's all interface{} (now Any) and reflection. If we're talking about developers new to a language, I'd argue that Rust's type system is easier to grok than the cases you may need to account for in Go.
Re:Why use Rust on the back end? by tptacek on Monday March 20, 2023 @08:21PM (#35240825)
I'm not interested in the language war. It's just the case that Rust is both more difficult to learn --- especially if you've never worked in an unmanaged runtime before --- and more difficult to write. Which language is "better" is undecidable.
Re:Why use Rust on the back end? by yumraj on Monday March 20, 2023 @08:44PM (#35241027)
Harder than C++? Harder to use than C?

Above is a question, not a snark. I like learning languages and haven’t dabbled in Rust so am curious.

Re:Why use Rust on the back end? by tptacek on Monday March 20, 2023 @09:16PM (#35241310)
C++ vs. Rust is a tricky question. C++ is easier to write in, but it's harder to get programs working in it. Rust is harder to write, but it's much more likely that your first execution is going to do something useful. But they're of comparable complexity.
Re:Why use Rust on the back end? by elcritch on Monday March 20, 2023 @10:59PM (#35242043)
Second this. Rust also follows some habits of C++ like verbose syntax and accidental complexity. There was an article recently where a Rust port of a C++ application ended up being comparable in lines of code.
Re:Why use Rust on the back end? by sn9 on Tuesday March 21, 2023 @07:34PM (#35254382)
There's a sense in which people are saying it's easier to learn other languages than Rust because it's easier to get to code that compiles so you can start building new features.

There's a different sense that I feel is being overlooked by those people in that the problems you run into with Rust are frequently actual flaws or bugs in your code, and the compiler shouldn't be thought of an adversary blocking your way to feature development but a teacher showing you the things you're overlooking. So once you put in the upfront cost of learning how to write Rust that compiles, you get code that's much more maintainable, correct, and easy to refactor.

So for someone that likes learning languages, I'd say choosing to learn Rust is a great choice and will teach you things you can take with you to other languages.

Re:Why use Rust on the back end? by tialaramex on Monday March 20, 2023 @09:16PM (#35241312)
I'm sure this is true for some people, but I found in Go their "Don't Be Clever" just drove me nuts. There's a thin layer where it's fine, and then once you get beyond that your options are Be Clever (Nope, Go tells you not to even try) or Give Up, I gave up.

Whereas in Rust I was able to keep going. Sometimes, when I dug down I reached something truly enlightening like the implementation of core::mem::drop -- pub fn drop<T>(_x: T) { }

[ Yes I said implementation, that's not a typo, that's the actual implementation. ]

Sometimes, it's all fucking turtles, e.g. Aria's famous "Pre-pooping your pants" essay and her "Tower of Weakenings". There's bad news, but if you don't like that we also have more and different bad news.

And sometimes it was a voyage of discovery, but it was an interesting voyage, I learned much and I felt invigorated and encouraged. For example why C++ std::vector's reserve is not Rust's Vec::reserve but Vec::reserve_exact or why Rust's functions each have unique unnameable types, or how MaybeUninit actually works.

Re:Why use Rust on the back end? by tptacek on Monday March 20, 2023 @09:26PM (#35241380)
I have no trouble believing that there are programmers who enjoy writing Rust more than they enjoy Go, and many of those programmers are probably faster when they're not being irritated by the language they're working in. But I simply don't buy arguments that Rust is easier to pick up, or even as easy. Go is a garbage collected, managed runtime. Rust is in some ways harder to write than C++.

The very last thing I'm here to do is to advocate for Go over Rust, or vice versa. But there are some basic facts about the languages we should be able to recognize, without falling into a bottomless pit of language war. Rust is more complicated than Go, and it's that way for a reason: you can readily use Rust in problem domains that don't admit Go.

Re:Why use Rust on the back end? by tialaramex on Monday March 20, 2023 @11:06PM (#35242084)
It does feel like it ought to be true - like you said, there's a garbage collector, surely it'd be easier?

But alas, Go's quest to avoid being clever often means that when the simplest thing would be too clever that must be avoided. If you are implementing Go this is presumably a great convenience, but I'm not implementing Go, I was just trying to write software.

Rust and Go agree that 1 == 1 and 5.26 == 5.26 and "New York" == "New York", but then Go wimps out. Rust has no problem if we should like to use this equality operator on arrays of integers, or slices of booleans, or for that matter HashMaps of HashSets of Vecs of Strings, but that's all too Clever for Go, so in Go we must use extra functions like reflect.DeepEqual.

Rust and Go both agree there's fundamentally only one loop. But, they disagree on what that fundamental loop is. Rust's fundamental loop is named "loop". It just loops, forever, it's a loop. Go's idea of a fundamental loop is a variation on C's for loop it uh, well it has two statements, plus a boolean expression, the expression is tested before each iteration and the first statement happens once, but the other statement happens after each subsequent iteration. That... doesn't seem simpler. I'm not sure what their excuse was here, is an infinite loop too Clever ?

There are a few more like this. Unsafe Rust is definitely way more complicated, but one of the less obvious benefits of that keyword is that it tells beginners what they don't need to know about. Ah, this is marked unsafe, I'm a beginner, no need to explore that yet.

Probably you can argue that the need to teach 'lifetimes undoes all this benefit and that's still safe Rust. It's a position I don't have hard data to refute, just my personal experience, for whatever that's worth.

Re:Why use Rust on the back end? by oogali on Monday March 20, 2023 @09:24PM (#35241367)
If you're just looking for field names (keys), what's wrong with map[string]interface{}?

Maybe I'm missing some key context, but I've never reached for reflection in the scenario you've described.

Re:Why use Rust on the back end? by tiffanyh on Monday March 20, 2023 @06:24PM (#35239683)
Off-topic: has Oxide shipped anything yet?

Geniunely curious since the company was found 3+ years ago (2019).

https://oxide.computer/blog/introducing-the-oxide-computer-c...

Re:Why use Rust on the back end? by steveklabnik on Monday March 20, 2023 @06:29PM (#35239742)
Server racks? Not just yet! Soon though. As we get closer, we’ve talked about it more and more, see this recent Oxide and Friends, for example: https://oxide.computer/podcasts/oxide-and-friends/1200412

We also have a ton of projects on our GitHub, including the web framework we developed for our API that I’m alluding to above. Of course, that’s not the core product, but you can see what we’ve got going on.

Re:Why use Rust on the back end? by dsincl12 on Monday March 20, 2023 @06:50PM (#35239973)
Would that be dropshot you're referring to?
Re:Why use Rust on the back end? by steveklabnik on Monday March 20, 2023 @06:52PM (#35239995)
Dropshot is the framework, omicron is the control plane implementation, which uses dropshot.
Re:Why use Rust on the back end? by evntdrvn on Monday March 20, 2023 @07:36PM (#35240426)
I’ve been working primarily in .NET the last five years, and have been transitioning to Rust professionally the last few years.

For some reason, people act like being a C# or Java dev means that you’re an idiot. If you’re skilled enough to be writing quality high-performance code in those languages, learning Rust is not a huge barrier…

Re:Why use Rust on the back end? by saurik on Monday March 20, 2023 @08:03PM (#35240702)
I agree with you: learning a new language, sometimes in the heat of the moment without even knowing the language existed before, is a thing skilled software developers are able to do remarkably quickly, even if they haven't specially gone out of their way to train for that skill, as, in the real world, you end up dealing with so many different languages--as a C#/Java developer you probably also have had to work with SQL, either bash or PowerShell, can't really avoid JavaScript, likely had to drop to C/C++ at some point to build a way to access a "legacy" component--that it is very difficult to avoid having the right generalizations happen accidentally in your brain.

But, I work with a lot of college students who are just beginning to learn software development, and the realization that that kind of generalization is possible is not obvious; and a lot of people who are only a few years into their career--but maybe think they are pretty damned good at it (I look back at myself when I had a mere 10 years of actual-real-world experience and think just how much I still had to learn to become who I am today... I am thankful I worked with some gods and always knew I had a long way to go)--not only have a hard time learning a new language (I remember when I was in high school trying to learn Pascal after I had spent years coding in Visual Basic and even getting paid to do so, and thinking I knew C... I did not ;P) but internalize how daunting it is and then go really far out of their way to avoid learning new languages (which, thankfully, I could not as high schools at the time were ping through a big upset in curriculums and so we learned a new language every year for a while and I got recruited to help my AP Computer Science teacher as he also was having to adjust way too quickly through Pascal, C/C++, and Java/JavaScript).

And it is actually quite remarkable how well people manage to do at this, using IDEs to avoid command lines and ORM technology and DSL compilers to avoid having to use SQL or other languages, they glom onto whatever ridiculous interop mechanism they can that prevents them from learning about low-level languages... and I think it really does hurt them, and I remember running into some software developers who did so well that they never managed to get to the right generalizations and they are now old and can still only program in one language (the same way I have a really really really hard time speaking in any language other than English); but like, most developers, no matter how hard they try, eventually do get enough exposure to enough at least slightly-different languages to get this skill (which is, when I get hired to teach courses, what I try to accelerate: Comparative Machine Language Morphology ;P).

But like, due to us all living in the Eternal September--and I do not just mean online: I was shocked recently when I learned how many CS students there are at most of the other Universities (it turns out the one I still live at is an extreme minority with only a few percent of the population being Computer Science and only half the students being engineering at all)--not only are we going to end up interacting directly with a number of people who actually do find learning new languages hard (and think it must fundamentally be hard for everyone forever), but I think we are going to run into a lot of managers on the front lines of trying to build businesses out of cogs (a practice I dislike on a number of grounds, but fully admit, if you can pull it off, is probably an extremely powerful and efficient way to do industrial/corporate engineering) who are also extremely resigned to the notion that the early-stage people they hire are oft incapable of learning new languages quickly enough to truly be a usable cog, as like... do they really even want to hire someone who has as much experience as you must (as the way you worded your comment implies you've been coding a lot longer than the mere 5 years you have been coding in Java/C# ;P).

Re:Why use Rust on the back end? by evntdrvn on Monday March 20, 2023 @08:34PM (#35240939)
Somehow I’ve started to become one of the older people in the room at work, I don’t know how that happened so suddenly :p
Re:Why use Rust on the back end? by DoesntMatter22 on Monday March 20, 2023 @10:50PM (#35241971)
This happened to me when I turned 30. I was like "wait... I'm not the young person anymore. Most of the people here are younger than me"...

Now I'm 41 and it's weird to be working with 21 year olds. Not bad but you just have these funny cultural differences.

Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @05:35AM (#35244158)
> using IDEs to avoid command lines and ORM technology and DSL compilers to avoid having to use SQL or other languages

IDEs, ORMs and other tools have their roles. They didn't get invented just because people are lazy and don't want to learn "command line" and SQL.

If you didn't have the occasion to experiences use cases where such tools are useful, that doesn't mean they aren't useful.

Otherwise you can argue that compilers are for people who are too lazy to write machine code directly.

Re:Why use Rust on the back end? by saurik on Tuesday March 21, 2023 @07:24AM (#35244789)
I can appreciate why my statement there might seem overly dismissive if you want to get particularly defensive; but I'm commenting on people, not technology, and I've met/seen quite a number of developers who rush to and relish these technologies to actively avoid learning languages, and list such as their primary reason for their use.
Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @05:39AM (#35244186)
> I agree with you: learning a new language, sometimes in the heat of the moment without even knowing the language existed before, is a thing skilled software developers are able to do remarkably quickly

Maybe it is true, for some people and for some languages.

However, learning the syntax of a new language means nothing if you don't already learn libraries, tools, frameworks, tools, patterns, idioms. And that still takes time.

Memory isn't unlimited and while you learn new concepts, try to make room for new concepts, you start to forget some of the old concepts, especially if you start using them less frequently or seldom use them.

Re:Why use Rust on the back end? by saurik on Tuesday March 21, 2023 @07:37AM (#35244883)
So, what I try to teach in my Comparative Machine Language Morphology course is the skill of being able to go from nothing to expert in a technology almost immediately by trying to get your brain to generalize into what we know about how humans conceptualize algorithms.

To tell a quick anecdote: when Apple announced Swift, I was hearing about it for the first time in the audience at WWDC during the keynote. As I watched, it was quite clear to me that this was a language that was mixing parts of Scala, Haskell, and (awkwardly enough) Ruby with the background of Objective-C, and it just immediately clicked. I ended up giving a talk about the language a few days later at AltConf.

The reality is that, unless people go extremely far out of their way to push their language in a way that makes it awkward for the user--I had a student who designed an esolang based on gravity and "roadrunner physics" where the code was a map where things didn't start to fall until they had some kind of interaction--there is very little "new" under the sun: the vast majority of "advances" in programming languages were already pioneered many decades ago.

(The most ridiculously-obvious example of this is probably Go, which has almost nothing that wasn't already understood by the 1970s, including its mechanisms around channel-oriented concurrency. There is an amazing article that attempts to compare Go to a "Brand X" language that turns out to be Algol 68. But like, Rust's entire schtick--the reason it is called Rust!--is because they actively refused to do any new language research and instead based it all on well-worn concepts, and yet people still whine about it incessantly merely because they haven't put anywhere near enough time into learning about the history of programming.)

Re:Why use Rust on the back end? by sn9 on Tuesday March 21, 2023 @07:23PM (#35254232)
Do you have any materials about your course online?
Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @05:27AM (#35244108)
Still, going from C# or Go to Rust means a productivity hit.
Re:Why use Rust on the back end? by jeremychone on Tuesday March 21, 2023 @10:21AM (#35246533)
There is a learning tax at the beginning, for sure, but this is a fixed cost. We experience that once this first hump is passed, the code and output quality is higher, and the cloud resource cost decreases significantly.

Now the trick is to hire new developers that are not familiar with Rust; it would take a month or so for them to be productive (assuming robust internal code practice).

(We are coming from Java / nodejs/TS)

Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @05:23AM (#35244077)
>At Oxide, we do "web API layer" stuff in Rust. We also don't require that candidates be Rust experts, though obviously experience helps. Many of those people who are "proficient in C#, JS, Java, Go, Python and the like" can absolutely write Rust, even if there is some slowness at first.

Many of developers who are skilled in X can learn Y. But that doesn't mean you should hire X developers and ask the to do Y.

The process should be easy. Identify the tool which is most fitted for the project. Hire developers proficient in that tool.

Re:Why use Rust on the back end? by gonzo41 on Monday March 20, 2023 @05:30PM (#35239051)
This is a very good point on thinking about engineering sustainability
Re:Why use Rust on the back end? by nivenkos on Monday March 20, 2023 @05:46PM (#35239241)
Rust isn't magic, you can become reasonably proficient in a couple of weeks just as with any other language.
Re:Why use Rust on the back end? by BFLpL0QNek on Monday March 20, 2023 @06:00PM (#35239385)
This argument gets posted for nearly every [insert language name] that isn’t JS/Java/Python.

It’s not to hard to learn. The Rust web stack is fairly simple and easy to get going with in a few days. Good developers use many languages and enjoy using many languages. If you drop the usual requires ten years experience you have just increased your hiring pool to a bunch of people who are excited to learn so will often put in the hard work to learn.

It’s a bit disrespectful to think a new grad can’t use a language other than JS/Python and they’ll be more productive in JS/Python. How little do you think of grads?

Re:Why use Rust on the back end? by hot_gril on Monday March 20, 2023 @06:11PM (#35239517)
I think highly of the new generation and would consider a good new grad about as good as me (a senior-level SWE age 26). My experience with fully learning and using Rust is that it's a constant burden for high-level work no matter how well you know it. Similarly with C++, except that is even worse.

Rust has its place for things that need to be especially optimized. It's far too pedantic for the kind of things you can do in NodeJS or Flask. New grad would be annoyed, and so would I.

Re:Why use Rust on the back end? by AA-BA-94-2A-56 on Monday March 20, 2023 @06:32PM (#35239783)
I don't know a whole lot about Rust, but if the pedantism is related to syntax, wouldn't current AI-assisted programming tools be able to help with that?

I've had GPT-4 explain to me weird niches in Django that I don't understand, because I'm coming from a Javascript background. It'll pick up what I'm trying to do, give me the code I'm trying to write, and tell me where I went wrong.

In the process I learn a lot, and waste a lot less time trawling Stack Overflow and parsing other people's code and closed threads.

It's a lot like having a more experienced developer over my shoulder.

Re:Why use Rust on the back end? by hot_gril on Monday March 20, 2023 @06:34PM (#35239814)
Idk if you'd call it syntax or what, but what makes Rust pedantic is that you're always worrying about lifetimes, types, explicit errors (as opposed to exceptions), and other things you mostly don't think about in JS or Py. Same as with C++ or other languages of that nature. Rust holds your hand more and is just better than C++ in general, but you still have to tell the compiler precisely what you're doing.

To answer your question, yes. This is also what I try to hint people at work who scoff at JS and refuse to move past "real programmer" languages, most of their talent is replaceable by GPT.

Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @06:11AM (#35244364)
> It's like C++ only nicer and safer

Rust is enforcing safety while C++ does not. C++ can be safe if you need it to be. Just use safe constructs.

I'd argue that some people might not find Rust nicer.

Re:Why use Rust on the back end? by hot_gril on Tuesday March 21, 2023 @12:57PM (#35249008)
C++ won't be as safe as Rust unless you use it like Java, copying everywhere or overusing shared_ptr so you don't worry about lifetimes, which nobody really does.
Re:Why use Rust on the back end? by jandrewrogers on Monday March 20, 2023 @08:18PM (#35240798)
I would argue that learning the language is the easy part even though in my experience some languages are much more difficult in practice to become effective in than others. The hard part is acquiring the expertise related to the domains where particular languages are commonly used. Knowing a language does not convey competence in the domain where they are typically used or the idioms imprinted on the use of the language by those users.

Knowing the language is necessary but not sufficient. There is an enormous amount of practice around language that is not implied by the language itself that you need to learn if you want to be effective.

Re:Why use Rust on the back end? by JohnFen on Monday March 20, 2023 @06:08PM (#35239484)
> You have narrowed down your hiring pool to expert Rust developers

I don't think that's really that big of a deal. Any above-average developer should be able to become useful in a new language in a pretty short period of time. They don't have to know the language on day 1, they only have to know how to develop software.

Re:Why use Rust on the back end? by zeroxfe on Monday March 20, 2023 @06:10PM (#35239510)
That sounds reasonable in theory, but doesn't work out in practice.
Re:Why use Rust on the back end? by re-thc on Monday March 20, 2023 @06:14PM (#35239553)
In practice we already have our hands full learning the domain unless it's a completely greenfield project. Working out the language and its frameworks makes it exponentially harder when coming into a project.
Re:Why use Rust on the back end? by JohnFen on Monday March 20, 2023 @06:16PM (#35239575)
I've seen it work in practice plenty of times. It does take a particular sort of dev, though.
Re:Why use Rust on the back end? by hot_gril on Monday March 20, 2023 @06:18PM (#35239608)
It's not about learning the language itself, it's about learning the tooling and libs associated with it, and that takes time.
Re:Why use Rust on the back end? by Klonoar on Monday March 20, 2023 @06:12PM (#35239539)
You do not need an expert-level Rust developer for a backend web server. The hiring pool isn't really a big deal here.
Re:Why use Rust on the back end? by pongo1231 on Monday March 20, 2023 @07:27PM (#35240354)
Yup. It's only an issue if you insist on an immense amount of years of experience as a requirement for working on your web stack.
Re:Why use Rust on the back end? by fnordpiglet on Monday March 20, 2023 @06:29PM (#35239751)
Why can’t candidates learn rust? I’ve never hired people based on specific language skill set. Any skilled developer should be able to learn any language.
Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @06:17AM (#35244394)
Being able to learn X doesn't imply they must learn X. Maybe they don't like X and its way of doing things, which is a perfectly valid reason not to. They can be using Y and enjoy what they are doing.
Re:Why use Rust on the back end? by fnordpiglet on Tuesday March 21, 2023 @08:58AM (#35245509)
For sure, but why should I make stack decisions because random SWE doesn’t want to learn something new? If it were asking folks to learn cobol I’d get it. But “learn modern language X with a bunch of experts” should attract the folks who are, IMO, exactly who I want to hire. They’re not afraid to explore and learn, they bring adjacent skills, and they’re eager to keep a simple stack.
Re:Why use Rust on the back end? by mrits on Monday March 20, 2023 @06:36PM (#35239823)
If a recent college grad can't learn rust quickly the rest of us have no hope.
Re:Why use Rust on the back end? by imron on Monday March 20, 2023 @06:36PM (#35239828)
> You have narrowed down your hiring pool to expert Rust developers even though all you need is a new college grad who can start a Flask server

On the plus side, if you hire someone who isn't an expert Rust developer and they mess things up, it will break at compile time instead of at runtime.

Assuming you still have some Rust developers at your workplace, and assuming the new developer is not completely incompetent, they should be able to get up to speed before too long.

Re:Why use Rust on the back end? by tialaramex on Monday March 20, 2023 @08:27PM (#35240871)
If Rust was C++ what you're saying makes a lot of sense, but it isn't.

Safe Rust is not something that's going to be a problem for a good developer. If they've actually understood what they were doing in C# or Go, for example they'll be fine. It's another semi-colon language, they can be spun up on this language with the Book, or a day's Pluralsight or whatever makes sense.

Yes, Rust makes more sense if that C# programmer also dabbled in F# or maybe the Go programmer took a semester of an ML in college ten years ago, because hey, this semi-colon language is sometimes an ML in a trench coat, but that's not crucial to being productive.

If your software ends up with non-trivial amounts of Unsafe Rust then yes, you will need somebody who knows what the fuck they're doing. But that'd be true if you needed unsafe C# (yes, that's a thing) and again, there's a lot less experience with unsafe C# on the market just like for Rust. And if you've got a problem for which Unsafe Rust was appropriate you'd need all the help you could get in these other languages.

Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @06:14AM (#35244378)
>If your software ends up with non-trivial amounts of Unsafe Rust

Than maybe it's easier to just use C or C++.

Re:Why use Rust on the back end? by DeathArrow on Tuesday March 21, 2023 @05:19AM (#35244054)
> If you have a team of system developers fully proficient in Rust, and the next task is to build some middleware web API

If your next task is to write a web api the sensible thing to do is to assign that task to a team of backend developers. Conversely, you generally don't ask web developers to do system programming.

Re:Why use Rust on the back end? by justsomeuser on Tuesday March 21, 2023 @10:20AM (#35246505)
I don’t think it is that serious of an issue:

- The API is likely to be simple (JSON in and out, or something similar). Those devs already know they domain well.

- The Rust compiler enforces only valid programs, so you won’t get runtime errors for things you would in dynamic languages.

- This leaves just getting the logic right, which the developers know how to do in general, and Rust is a c-like language so it’s familiar.

Re:Why use Rust on the back end? by paulddraper on Tuesday March 21, 2023 @10:26AM (#35246625)
By the same token, if all you have is Flask engineers, and you need a Rust service, it's going to be a struggle too.