Live data from Hacker News

Why Rust is a great choice for startups

dailyedit.com

141–150 of 294 posts

Re: Why Rust is a great choice for startups

#141

Earlier quoted context omitted.

Two things I consider: 1. what languages does the team already know best? 2. are any languages dominant in the problem space? for us, I've used Python over 10 years and Python is the leader in data science / analytics. Some things might be a little faster if we used Rust, but compute is cheap. Go with what you know.

I agree that one doesn't necessarily need a fast language, but I think that the "hardware is cheap" idea is very misleading. Renting/owning 5x as much servers may be cheap, but maintaining them isn't.

check out https://cloud.google.com/run. I've never had issues 5x-ing compute on it.

All the other services that compute hits (e.g. Postgres) are a different story, but that doesn't really matter when picking a language.

Re: Why Rust is a great choice for startups

#142
Two days ago I started to rewrite an api I made years ago in Nuxt3. The day after I finished it. Sure, I know javascript and I could reuse a small bit of code but if I would imagine switching to rust it would probably take me at least a month mostly because I don't know much about it.

The times I've actually tried Rust out it's been a struggle, to say the least, and I am a programmer with over 10 years of experience. Ok if you are the VC-funded kind of startup that needs developer hype and can afford to hire people. But if you are a bootstrapped startup I barely can think of worse languages than Rust to start with unless you've extensive experience in it.

The crates available seems sparse and of low quality. Getting back to my example, I would have to rewrite a parser from scratch most likely and only that would probably take me quite some time while in node I can just npm install it which have worked flawlessly for years.

Unless you're in a market that requires the service or product to utilize every cent of performance or is in embedded industry I think Rust is a terrible choice for a startup.

Re: Why Rust is a great choice for startups

#143

Earlier quoted context omitted.

On the other hand, you might attract talent that wants to use a specific language like Rust, but hasn't had the chance in their current professional environment.

I've been toying with Rust on and off for a few years. It has an extremely steep learning curve. As a novice it's incredibly difficult to do things that are trivial in other languages. > On the other hand, you might attract talent that wants to use a specific language like Rust, but hasn't had the chance in their current professional environment Maybe if you're doing something embedded? Otherwise, the learning curve…

There are plenty of Rust devs looking for work outside of embedded.

Also, for me Rust's speed is one of the benefits. I would default to Rust for a lot of different things where speed doesn't matter at all.

Re: Why Rust is a great choice for startups

#144

Earlier quoted context omitted.

I still find this type of comment odd (although I do also recognise that it's very common). I write a lot of code in C++. And I'm definitely no fan of it, so I'm not here to defend it! And I write a lot of bugs in that code. But very few of them are segfaults. With smart pointers and some common sense, they're just not that big of a concern. Yes, they do happen, but it's far a minority of the bugs. Maybe everyone jus…

Rust's "lifetime stuff" really is overemphasized. You can write years of totally ok Rust code without ever having to handle a single explicit lifetime. They're there, and one should have a general picture of how they work, but unless you're doing high perf / library stuff, they can generally be sidestepped. I believe there should be a Rust manual that shows the easy way in, using Rc/RefCell before reaching for plain…

You're benefiting from elision. Modern Rust lets you omit mention of a lifetime when there's only one plausible choice. So, often today you can write Rust that doesn't mention lifetimes but they're implied.

But it wasn't always like that. For a while Rust would insist you spell out that OK, this function parameter has some lifetime 't and the function result also has a lifetime 't. Now, Rust says well, the result needs a lifetime, and your function takes one parameter which also has a lifetime you didn't specify, so, the plausible explanation is that they're just the same lifetime, let's assume that's what you wanted and only complain if that won't compile.

Re: Why Rust is a great choice for startups

#145

I started my first Rust project a month ago after working for years in Golang and before that Python (and before that Perl, C/C++ and Turbo Pascal). I really like the whole experience but I'm not sure if I'd recommend writing all your backend code in Rust as a startup. Rust definitely provides a pleasant experience and is very powerful. If you can stick to the standard library I think Rust is great, though the packag…

> I recently picked up Python again to write a simple REST API, and the process is just so much faster

For me it's much more important how will it work in the next few years, not how quickly you can write it. If I could, I would use Rust for pretty much everything just because I don't like getting paged in the middle of the night.

Re: Why Rust is a great choice for startups

#146
When you're building a product you definitely want to spend your time fucking around with all the object lifetime concepts of Rust or the subtleties of its compiler...

Just use any language with high-level features like a garbage collector, bignums by default and message passing concurrency (Racket, Erlang, whatever), and you will be more productive, and actually have more "fearless" / safe programming than you will ever have using Rust.

Re: Why Rust is a great choice for startups

#147

Author here: lots of usual language-war type comments here. Just thought I'd add my own little bit of water (hopefully). In my post notice that aside from my personal background with programming I didn't go into detail about memory safety, which seems to be what many are debating. Frankly, it's not even one of my top reasons for praising the language. If I had to pick three these are what I'd choose: 1. Strong featur…

For point #3, take a look at Hex[0] which is a package manager for the erlang/elixir ecosystem.

[0] https://github.com/hexpm/hex

Re: Why Rust is a great choice for startups

#148
post #75

Author here: lots of usual language-war type comments here. Just thought I'd add my own little bit of water (hopefully). In my post notice that aside from my personal background with programming I didn't go into detail about memory safety, which seems to be what many are debating. Frankly, it's not even one of my top reasons for praising the language. If I had to pick three these are what I'd choose: 1. Strong featur…

So, F# with NuGet/Fake, Scala or Kotlin with Maven/Gradle, OCaml with OPAM. Those points are hardly Rust specific and apply to any compiled language with ML influences.

These comments are still in context of using the language in a startup. Good luck with finding Ocaml, F# or Scala devs.

Re: Why Rust is a great choice for startups

#149
post #124
post #117

Earlier quoted context omitted.

I'm doing some work on a friend's startup, and we have a pretty stark divide between our hot path gateway service and our lower traffic services. All three of our services are currently written in typescript with no plans to change, but I've earmarked the gateway as "maybe we'll rewrite it in Rust in three years." It's so small it's nearly trivial (so a rewrite of that specific service will be quickish) and infrequen…

> Not sure how a hybrid approach will work. The hybrid approach works great. We use typed scripting languages for business logic and Rust CLI tools for "inner loops", and this balance gives us the best of both worlds. There is an important caveat here: If you are already comfortable in Rust, then it's a fantastic tool for all sorts of things. But if you're just learning Rust, then there's a one-time cost for getting…

> The learning curve is shorter if you already know about pointers and closures

Every time I read something like this, I'm reminded that pointers and closures aren't universally understood concepts in professional programmers. And I'm sad.

Re: Why Rust is a great choice for startups

#150

I started my first Rust project a month ago after working for years in Golang and before that Python (and before that Perl, C/C++ and Turbo Pascal). I really like the whole experience but I'm not sure if I'd recommend writing all your backend code in Rust as a startup. Rust definitely provides a pleasant experience and is very powerful. If you can stick to the standard library I think Rust is great, though the packag…

I wouldn't touch Python with 10-foot pole for any serious project. People who're used to dynamic languages (e.g., JavaScript) are now starting to see how indispensable static typing is when they try out TypeScript and then never want to go back.
Post reply on HN