Skip to content

Instantly share code, notes, and snippets.

@Verdagon
Created November 18, 2022 23:54
Show Gist options
  • Save Verdagon/2d1357c412934d1795b006a72bd2eac4 to your computer and use it in GitHub Desktop.
Save Verdagon/2d1357c412934d1795b006a72bd2eac4 to your computer and use it in GitHub Desktop.

Prototyping and Iterating

The borrow checker can be [slower](https://news.ycombinator.com/item?id=31063493 .anecdote) to prototype [with](https://news.ycombinator.com/item?id=26419670 .anecdote) when we just want to [solve](https://news.ycombinator.com/item?id=28804477 .anecdote) [the problem](https://news.ycombinator.com/item?id=23744577 .anecdote) rather than being [distracted by the language](https://blogs.dust3d.org/2019/03/13/why-i-rewrote-the-mesh-generator-of-dust3d-from-rust-to-cplusplus/ .anecdote), even for [more](https://lobste.rs/s/veinkw/comparison_rust_zig#c_nmf8jz .anecdote) [experienced](https://news.ycombinator.com/item?id=31568497 .anecdote) [rustaceans](https://www.reddit.com/r/rust/comments/iwij5i/blog_post_why_not_rust/g627nwx/ .anecdote).

[One user says,](https://www.reddit.com/r/rust/comments/iwij5i/comment/g62ytxa/?utm_source=share&utm_medium=web2x&context=3 .anecdote) "Rust’s complexity regularly slows things down when you’re working on system design/architecture, and regularly makes things faster when you’re implementing pieces within a solid design (but if it’s not solid, it may just grind you to a total halt)."

Once you're done prototyping, it can be [difficult to change your program](https://www.reddit.com/r/rust/comments/iwij5i/blog_post_why_not_rust/g62ytxa/?utm_source=share&utm_medium=web2x&context=3 .anecdote), like [moving through molasses](https://news.ycombinator.com/item?id=16663159 .anecdote). Refactoring can be a [massive pain](https://lobste.rs/s/jgcvev/why_not_rust .anecdote), especially if you [change the way you store some data](https://lobste.rs/s/x22ulj/why_developers_who_use_rust_love_it_so_much#c_yd7dmv .anecdote).

[One user says,](https://kevinhoffman.medium.com/to-box-or-not-to-box-my-first-real-rust-refactor-db467119c4c7 .anecdote) "In general I find refactoring to be a far more excruciating process in Rust than in other languages." [# The user continues on to say "It is also far more satisfying." There's nothing quite like the feeling of being done with a refactor, especially when it improves one's code.]

[Another user says,](https://news.ycombinator.com/item?id=27458058 .anecdote) "In theory ... it's possible to avoid the escape hatches if you are careful to structure access to your data juuuuust right. That works out fine if you're the only person working on an infrequently-changing program with a small model that you understand very well. If everyone needs to hook into the first two or three function call levels of the main loop, and if your model is anything but small, that doesn't work out anymore. Six weeks into the whole thing and people spend more time un-breaking builds than writing code."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment