Live data from Hacker News

Rust Foundation: Hello, World

foundation.rust-lang.org

281–284 of 284 posts

Re: Rust Foundation: Hello, World

#281
post #64

Earlier quoted context omitted.

I have a app that have been ported from old python -> f# -> rust (e-commerce like) and the transition was great ( https://www.reddit.com/r/rust/comments/hh9tz6/does_rust_have... ). You need to pay attention in how align the whole software stack. Pairing Rust with tailwinds and htmx or Hotwire simplify so much stuff is like cheating. For regular CRUD flows having enums/traits/iterators make domain modeling very good a…

Can you share a bit about how you’ve integrated Hotwire with Rust? I recently wondered how well they’d pair.

I use htmx, just pointing Hotwire will be similar.

With this kind of library, your rust code is the same as processing regular html forms, is only the HTML that need to be annotated.

MAYBE you could optimize partial rendering detecting just the portion to change:

https://htmx.org/docs/#requests

But I not bother with that.

Re: Rust Foundation: Hello, World

#282

Earlier quoted context omitted.

Maybe I'm weird, but I find the explicit ownership, mutability and lifetime information encoded in Rust definitions very helpful at understanding a new code-base. Something that otherwise needs to be documented in comments / external documentation in Java, but most often it is missing, and then recovering such information from the code is similarly hard to recovering the types in a dynamic language. Lack of GC in mak…

It gives you a lot more information, but a lot of that information is more about lower-level mechanics than "business logic". I think it really depends on what you're writing and what's important to it.

It can be actually tied pretty well to business logic. You can explicitly model some business rules, e.g. a subscription cannot exceed the lifetime of the user account, etc. Similar to how you can use static type system to prohibit invalid states. Here Rust gives more tools of this kind, than other languages.

Another one I really love is ability to destroy objects on final operation. E.g you close something and it can't be used any more. Most other languages can protect using such closed object only with runtime exceptions.

Some languages like Java don't even make a distinction between "object A is composed of B and C" vs "uses B and C" (in both cases they'd be references)

Re: Rust Foundation: Hello, World

#283

Just as crazypython said, it seems that the power has shifted from Mozilla and the community to big corporations on the future of Rust. This is worrying to me in that engineers are naively selling their souls to big corporations just to work on Rust. I'm glad for the formation of the foundation, even though I hear that even Facebook (although not on the board yet) are looking for engineers to work on the Rust compile…

No language has ever been ruined by large corporations. Languages are too far removed from society to be affected by this.

> No language has ever been ruined by large corporations.

Oracle ruined Java.

Re: Rust Foundation: Hello, World

#284

Earlier quoted context omitted.

No language has ever been ruined by large corporations. Languages are too far removed from society to be affected by this.

> No language has ever been ruined by large corporations. Oracle ruined Java.

How? Pron seems to be ok with the direction: https://news.ycombinator.com/item?id=19827063
Post reply on HN