| ▲ | socalgal2 2 hours ago | |
Looking forward to your talk. I feel like there's a taste issue which is similar to tabs vs spaces or other coding styles. Some languages kind of solve this with auto-formatting but just because they choose a standard doesn't mean their standard is as readable as some other. In languages one taste issue that comes to mind. Many languages have the invisible scope issue
In C++ for example, foo could be a local variable, a member of the enclosing class, a local module static, or a global. Some programmers like this, JBlow for example complained that in C++, switching between standalone function, member function, a lambda required too many changes. (foo = bar) isn't an example but the point is he wants that to be frictionless.Me though, I want the line to be understandable with as little external context as possible. I don't want to have to dig up 10, 50, 100 lines to see if a local foo has been defined or if it's member. So like python or typescript. I like foo has to be this.foo or self.foo if you want it assign the current object's member. Most programmers seem to agree because they end up using mFoo or foo_ or some naming convention to work around the issue but I think I'd prefer the language to enforce it. I don't know which if any languages make all the different scopes more explicit. So far I haven't liked Swift though which seems more explicit. Even though it's more explicit in some areas I feel like the majority of my time is typing boilerplate and fixing trivial syntax errors. I know programming requires syntax and, as an example, I include semicolons everywhere in JavaScript even though they are not required. That said, I would like to get all the time back in my life where I compiled some C++ only to be told "error: missing semicolon at end of class definition" or "error: extra semicolon at end of member function declaration". It feels like a language should fix this stuff for the dumb human rather than make the human do random tedious work. I get there might be times where it's ambiguous but I wonder if it's also a language design issue. | ||
| ▲ | WalterBright an hour ago | parent [-] | |
I think you're going to enjoy my talk! | ||