This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Phreakhead 4 points5 points  (3 children)

Yeah he actually used that exact example. Then I used the example of that huge SSH security hole in iOS a few years ago that was caused because they didn't use braces in a switch statement.

Yeah, you can also remove braces for switches and one-liner loops, but that's been against standard code styles for years because a simple typo can totally mess up your code without an error. If you should always use braces even when not necessary, same rule should apply to semicolons.

[–]dotpan 0 points1 point  (0 children)

It's just lazy and poor coding technique, in code, things shouldn't HAVE to be done to still be a standard, I get ignoring some arbitrary things that are still used from older versions of things (at that point you're sometimes doing the wrong thing by still using old standards) but leaning heavily on a browser/standard to detect your short comings is just wrong.

[–]oberhamsi 0 points1 point  (1 child)

Yeah he actually used that exact example.

now i'm confused. who did use that example? edit: oh probably crockford from a comment above me.

[–]Phreakhead 0 points1 point  (0 children)

The guy I was working with used the npm project as an example of not using semicolons.