DEV Community

Discussion on: How do you feel about braces and semicolons?

Collapse
 
dmfay profile image
Dian Fay

I've been writing JavaScript more than anything else for the past five years but my background is all Java and C# and old habits die hard.

Also, JS being explicit about statement terminators would have saved me more time than I'd like to admit trying to figure out what was going on with

return
  someComplexConstruction;
Thread Thread
 
mortoray profile image
edA‑qa mort‑ora‑y

Without the fear of JS wackiness, would you be comfortable with semi-colon-less code?

I grew up on semi-colons as well. I don't use them in JS either now -- I'd rather play with fire than see them anymore. :)

Thread Thread
 
dmfay profile image
Dian Fay

It'd depend. In C-family languages, I wouldn't, at least initially. But I could probably get used to it. I still don't like Groovy but there's a lot more going on there than the lack of semicolons.

Other languages, anything goes.