3 ms·
I try to optimize for the reader of the code who didn't write it who has to maintain it, which often feels like myself a year after I crack back open the file.
by kshahkshah 3y ago
I try to optimize for the reader of the code who didn't write it who has to maintain it, which often feels like myself a year after I crack back open the file. From that perspective, I don't love _1. Basically I don't want to have to dereference things when possible, I want a direct reference. My working memory is not large, etc.
I'm not sure I see the value of ".then"... the one-off variable names on the side make it easy for me to scan quickly and understand what is happening w/o having to procedurally view the right side of the assignment. If you want to ensure that these vars are truly one-off, wrap it in a block or method.
I don't think Ruby's syntax needs to evolve. I just wish the core team cared more about opening up the lang to the improvements which were being offered by e.g Chris Seaton (RIP) and his colleagues. I wish typing proposals were being hotly debated etc. I'm sad that after 20 years I don't really want to use Ruby or Rails going forward despite how incredible the ecosystem really is, mostly because the data science, typing, and FE integration story is weak now.
- Syntaf 3y agoAs someone who loved rails, got a job writing typed python, then tried to go back to rails, the lack of typing really kills me. I never realized how _nice_ it can be to have types in a dynamic language, even if they’re just annotations. To be fair though Ruby is a much much harder language to wrangle under types than python.