3 ms·
The downside is that the entire depth of the "syntactical stack" has to be taken into consideration over the whole range of the expression's length. Those walls
by usrusr 3y ago
The downside is that the entire depth of the "syntactical stack" has to be taken into consideration over the whole range of the expression's length. Those walls of openings and closings at the beginning and end... Those don't really serve any purpose besides creating pressure to come up with names for intermediates. When those names are good they are helpful, but that's not a given. Those named intermediates lurk in the scope because you never know if they might be use-and-forget or not (well, unless the code happens to be rust)
The strict flat-binding left to right chains of the dot and friends allow for a nicely streamlined "intra-expression scope" in the mind while reading. To me this feels like a lot of brain capacity getting freed for more important things. King of that hill is the "kotlin let" which allows just about everything to get converted into left-to-right. I miss that in every other language.