Topcoat is pushing the boundary of server applications with Rust
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Topcoat is pushing the boundary of server applications with Rust
Unofficial Hacker News client; not affiliated with Y Combinator.
Thaxll · · focus · HN ↗
What the heck is this.
xyst · · focus · HN ↗
maplant · · focus · HN ↗
I won't get into the HTML part (I think it's obvious), but the
part is a rust closure. |_e| is the argument to the closure, which has a leading underscore because it's unused. I imagine it's some context about the event (thus the e). The rest is the body of the closure. It increments the count.pretty simply
wannabe44 · · focus · HN ↗
Even though macros can do this, it's not intuitive to expect this kind of JSX soup in rust. It's difficult to reason about than a function call. Something like flutter where widgets are ordinary function calls is far better.
Plus the macros add to the compile time tax.
This is another exhibit that rust is full of web programmers from React JS world (the above is exactly like JSX), all about aesthetics than practicality and predictability these days, pulling what should be a system language into incompatible directions.
Long live zig for trying engineering directions rust couldn't. But we need a rust killer with memory safety which gatekeeps web programmers and slop peddlers.
maplant · · focus · HN ↗
wannabe44 · · focus · HN ↗