4 ms·
Some people are comfortable offloading mental effort to a compiler. Others suffer from anxiety at the suggestion.
by chowells 2y ago
Some people are comfortable offloading mental effort to a compiler. Others suffer from anxiety at the suggestion.
- bsnnkv 2y agoI'm the other way around I guess - a lot of anxiety when I'm forced to touch fragile bits written in Ruby, Python and JS at work. Part of it might be the terrible tooling story in each of those language ecosystems as well. Last week I deployed a Ruby change where a missed comma between two strings in an array did not get picked up by any of the automated tooling or by 3 other team members who code reviewed my change, and ended up cutting 50+ sev2s at 10pm. AWS folks can probably guess which internal tool I had to touch that requires Ruby. (I was on call, fun times)
- x3n0ph3n3 2y ago> Rust is the only language where I can open something like Notepad without an LSP or highlighting, write code for an hour without testing or compiling, and then run clippy a few times to see and make the suggested fixes. > anxiety when I'm forced to touch fragile bits written in Ruby Wild, because the first sentiment is exactly how I feel about Ruby.
- bsnnkv 2y agoTogether we would be unstoppable :)
- wonrax 2y ago> I feel a lot of anxiety when I'm forced to touch fragile bits written in Ruby, Python, and JS. I resonate with you even with TypeScript, since it's just annotating types but not the true value under the variable. You would have to go to a greater extent to make sure that everything from outside (library code, parsing HTTP responses, database queries, etc.) conforms to your annotated types. Even in the same project code created by other people, I often doubt the validity of the types, asking myself questions like: Should I validate this? What if this has already been validated, thus making mine a performance waste? Does this object contain extra sensitive information that could be leaked when used in a logger? After having experience with Rust, working with TS feels like navigating a minefield where every refactor could detonate hidden bugs or behavior collectively accumulated by all the historic code and dependencies, small or large.
- throwaway173920 2y agoI haven't had this experience with TypeScript. In the projects I've worked with, we turn on strict mode and heavily discourage using `any`. I generally feel pretty confident that the type annotations match the runtime values.