4 ms·
Slow change is good for small projects that you want to build once and use for decades without much maintenance.
by dskloet 5y ago
Slow change is good for small projects that you want to build once and use for decades without much maintenance.
- mojuba 5y agoA language that uses archaic syntax with dollar vars, semicolons, is pretty verbose itself may die before it evolves into something sensible. Not that I believe PHP will die any time soon, but just replying to your "slow is good".
- azangru 5y ago> A language that uses archaic syntax with dollar vars, semicolons, is pretty verbose itself may die Careful there :-) Modern javascript has semicolons and is introducing pretty horrendous syntax for private variables (an octothorpe) and possibly for the pipe operator (percent sign, was it?) and for tuples and records, yet is showing no signs of dying.
- cute_boi 5y agoI have never written JS with semicolons after 2015 idk why you are saying Modern JS has semicolons? I simply didn't get it. Am I missing something.
- azangru 5y agoI mean, it clearly has them; it's part of the syntax. You can skip them, and the parser will insert them for you; but the language has them.
- cute_boi 5y agoyea but its optional so does it matter? In PHP its compulsory, right?
- Minor49er 5y agoSometimes the extra options can produce unexpected problems. For example, in JavaScript, this would return nothing and may result in an unreachable code warning: function go() { return 5 + 3; } console.log(go()) Since semicolons are optional, it's treating "return" as its own statement and "5 + 3" as a separate one. There are no hidden gotchas like this in PHP though since semicolons are always used: function go() { return 5 + 3; } var_dump(go()); This will return int(8).
- kaba0 5y agoThere is no real producticity gain through not having semicolons and somewhat leaner syntax. That was never the bottleneck: ecosystem, libraries are.
- mojuba 5y agoThere is a real productivity gain when you remove all things that cause a mental tax on reading. After Swift I don't want to look back at the C-like syntax languages any more (just that occasionally I have to).
- kaba0 5y agoYou may think so subjectively. But there is no objective study whatsoever that would support that.
- tangue 5y agoI do like dollar vars, because I know immediately when it's a variable and don't have to rely on syntax highlighting.