Live data from Hacker News

Rust needs a web framework

ntietz.com

271–280 of 395 posts

Re: Rust needs a web framework

#271
post #97

Earlier quoted context omitted.

> Worrying about lifetimes Again, not my experience at all. I simply don't think about any of that stuff when I write Rust, all my mental energy can safely go towards working on whatever I'm building. If you don't believe me, you're welcome to watch the literally hundreds of hours of me live coding in Rust on YouTube.

> Again, not my experience at all. I simply don't think about any of that stuff when I write Rust Your subjective perception is not reality. You have to think about it, or your programs will be incorrect. The mental load may be low to an experience Rust programmer, but it is there, and it's very intrusive to Rust beginners like myself. > If you don't believe me, you're welcome to watch the literally hundreds of hours…

Glad I noped out of this particular bad-faith subthread last night.

I am pleasantly surprised to see however that this unfortunate subthread produced interesting and well-intentioned comments from others.

Re: Rust needs a web framework

#272
I think dhh said, great frameworks/libraries are extracted, not created from scratch. That would mean, someone building a (successful, money making) web application in Rust and building their own framework as they go, open sources that framework and then continues using it for their production applications.

I have not seen such a success story for any Rust web framework yet. Although I would love to see one (or more!)

Re: Rust needs a web framework

#274
post #193

Earlier quoted context omitted.

> The answer for why folks are so inclined towards doing high-level tasks in Rust... is the type system. TypeScript has an equally powerful type system. Python's type system is almost as good. Both have are significantly more productive when it comes to writing software, and have bigger ecosystems and lower learning curves. > It makes a lot of progress towards the goal of "make invalid states unrepresentable", which…

As someone who loves both TS and Rust: you couldn't be more wrong. TS is not even half as good at making invalid states unrepresentable. A simple example of the (many) things you can't do in TS: struct StateStart; struct StateEnd; impl StateStart { fn foo(self) -> StateEnd { StateEnd } } fn main() { let start = StateStart; let end = start.foo(); let another_end = start.foo(); // this won't compile } Try doing that wi…

Interesting, great example. This kind of compile time safety can't be achieved without borrow checker, I guess? I'm now thinking hard if there's some type magic similar to the exhaustive checks for Typescript discriminated unions ("kind satisfies never" checks in switch statements).

Re: Rust needs a web framework

#275
post #87
post #10

> I like to make silly things, and I also like to put in minimal effort for those silly things. I also like to make things in Rust… I think this part is perhaps the silliest part of a very silly article. If you really like to put in a minimal effort then why on earth would you use Rust? If you want efficiency, memory management and a compiled modern language just use Go. Then you won’t even need anything but the stan…

I am a fan of Rust for systems programming, but so many people are using Rust for things that are nothing even remotely close to systems programming. So many projects you see being written (or rewritten) in Rust are projects where I just think 'wait, why can't this just have a GC'? And then you look at the code base, and it's all Arc >s, and you can't help at marvel at this, since that's just GC, so what's the benefi…

> Go try Ruby on Rails for a while!

You gave a long list of benefits of Rust - which should have answered your own question - and then suggested people use an ecosystem with almost none of those benefits.

I’m sure it made sense in your head.

Re: Rust needs a web framework

#276

I think dhh said, great frameworks/libraries are extracted, not created from scratch. That would mean, someone building a (successful, money making) web application in Rust and building their own framework as they go, open sources that framework and then continues using it for their production applications. I have not seen such a success story for any Rust web framework yet. Although I would love to see one (or more!…

IMHO, there are three scenarios:

- Regular Web / Services: IMHO, Go, Java, .NET are better candidates there

- IoT devices with Web or API interfaces: Rust is good there. Access to I/O resources etc.

- Extreme high-performance services: Something like a DNS-over-HTTP or wall street data brokers. But for that you need a VERY solid server (but most likely not a framwework).

The regular web case will not produce a framework (out of commercial success), it is much easier to opt for a traditional languages/frameworks and hire inexpensive developers for that. The extreme high-performance services will not produce the framework you want and the likelihood is very small because the number of companies doing that is very low. Leaves the IoT space, which, IMHO, has the best chances BUT will not be the one optimized for your big server machine scenario.

Re: Rust needs a web framework

#277
post #211

Earlier quoted context omitted.

F#is not C like and it's tooling and packaging is not as good as rust. Last time I checked it had multiple packaging solutions like paket and nuget. The tooling on vscode can be buggy

Easy, stay with .NET standard tools, MSBuild. There is also Visual Studio and Rider.

> stay with .NET standard tools

That’s a dealbreaker in many situations.

Re: Rust needs a web framework

#278
post #193

Earlier quoted context omitted.

As someone who loves both TS and Rust: you couldn't be more wrong. TS is not even half as good at making invalid states unrepresentable. A simple example of the (many) things you can't do in TS: struct StateStart; struct StateEnd; impl StateStart { fn foo(self) -> StateEnd { StateEnd } } fn main() { let start = StateStart; let end = start.foo(); let another_end = start.foo(); // this won't compile } Try doing that wi…

Interesting, great example. This kind of compile time safety can't be achieved without borrow checker, I guess? I'm now thinking hard if there's some type magic similar to the exhaustive checks for Typescript discriminated unions ("kind satisfies never" checks in switch statements).

I've been trying to come up with a similar pattern in TS many times but I think you cannot do this due to the lack of moves (bindings do alias, pass by reference).

But TS has so many dark magical patterns that I'm still hoping to be proven wrong.

Re: Rust needs a web framework

#279
post #64

So strange reading all the comments here saying that Rust is not a language for "lazy developers". I'm an incredibly lazy developer and Rust only makes me lazier. I can pretty much turn off the part of my brain that deals with "programming language" stuff and put all that energy towards the part of my brain that deals with "building stuff" whenever I write code in Rust, because I have a high level of confidence that…

I agree with this 100%. Rust is the most effective language for the “laziest” of developers.

Re: Rust needs a web framework

#280
post #201

Earlier quoted context omitted.

Strongly agree, yet debates about improving the ergonomics of the language, for which there clearly "is a market", seem to be hindered by those zealous activists. A minority, I'm certain, but vocal nonetheless. It really can be small stuff too, like hiding that nested generic "GC adjacent" type salad to be accessible only if you need it, via a type alias. Yes, I can define that myself, but the point is that a lot of…

I used to think that it was more likely that Rust would "expand upward" to provide the higher level syntax that people want in a language like I describe above, but it does seem like the language development has vastly slowed down in terms of big new features. I don't necessarily think this is a bad thing; plenty of people didn't like how much churn there was in the first several years after Rust 1.0 came out. I pers…

Lol, and there are the downvotes
Post reply on HN