<div dir="ltr"><div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What can you do better in Rust that you can't do with your old codes by <br>
rearranging and restructuring?<br></blockquote><br></div>The debugging experience was primarily what pushed me to switch.<br><br>After working in NodeJS for the better part of a decade there were still new issues cropping up regularly in mature codebases - with the Rust rewrite most of the issues I faced in Node (and wrote test suites extensively for) have been resolved through the type system.</div><div><br></div><div>It's just not possible to write most bugs I would normally write in non ML-languages because every valid application state is modelled by sum-type algebraic data structures (ie. Rust Enums).</div><div><br></div><div>An invalid application state would be a compiler error, same for race conditions, use after free, null pointers, and immutability. Even SQL statements are type checked at compile time against my database tables thanks to <a href="https://github.com/jmoiron/sqlx">sqlx</a>. The only meaningful problems I deal with now are deadlocks.<br><br></div><div>Performance is also looking dramatically better and memory usage is down - those might have been possible with optimization in NodeJS but then my code would have been more difficult to maintain. I just got them out of the box with Rust in addition to the maintainability improvements.<br><br></div><div>- Rob<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 16, 2021 at 7:26 PM William Park <<a href="mailto:opengeometry@yahoo.ca">opengeometry@yahoo.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What can you do better in Rust that you can't do with your old codes by <br>
rearranging and restructuring?<br>
-- <br>
<br>
On 3/16/21 3:48 PM, Rob Gilson wrote:<br>
> So anyways it's been a year (maybe more?) of just not dealing with that <br>
> problem and instead focusing on developing my similarly private cloud <br>
> FOSS product (<a href="http://teggapp.io" rel="noreferrer" target="_blank">teggapp.io</a> <<a href="https://teggapp.io" rel="noreferrer" target="_blank">https://teggapp.io</a>>). Imagine my surprise then <br>
> when just as I am wrapping things up for a release (/queue I rewrote it <br>
> in Rust meme/) this pops in to my email!<br>
</blockquote></div>