3 ms·
I wish PHP makes the end of line semicolons optional like other modern languages. It saves a lot of typing when I have to trace brackets after auto completion
by mekster 7y ago
I wish PHP makes the end of line semicolons optional like other modern languages.
It saves a lot of typing when I have to trace brackets after auto completion to add the semicolon instead moving to the next line.
- giornogiovanna 7y agoIn JavaScript the automatic semicolon insertion is almost universally reviled. Why not just have your editor insert the semicolons for you if it's such a pain to type them?
- BurnGpuBurn 7y agoI never use semicolons in js except in for loops like for(let i=0; i<100; i++) In all other places it isn't necessary anymore.
- mekster 7y ago> Why not just have your editor insert the semicolons for you. They don't insert the semicolons automatically as it can't tell if it's the end of line or I'm about to invoke a chained method etc. Not sure what the down votes are about as it literally increases 2 to 3 letters of extra typing just to append the semicolon after auto completion. > In JavaScript the automatic semicolon insertion is almost universally reviled. Why? There's literally no need except on a rare occasion. My IDE happily gets rid of JS semicolons and it's far easier to type. Ruby and Python don't need one. Just feels tedious compared to other scripting languages.
- fraktl 7y agoErm.. no. It's the opposite for me. I've used semicolons for over 2 decades. I can type pretty fast. Removing one character under the guise of "but I type faster" is just pure BS. Without semicolons, I can't work. The person who came with the idea to remove semicolons in JS earned a special place in hell.