[Development] Using semicolons in JS (QML)

Ulf Hermann ulf.hermann at qt.io
Fri Sep 30 14:34:54 CEST 2016


> I think that would be fine to require semicolons everywhere except last statement (and if there is single statement in the binding, no semi-colons are needed at all)

I'm fine with having no semicolon on single statement bindings or signal handlers that also don't require a pair of curly braces. For everything else and our own sanity, please let's use semicolons. Having functions with semicolons on all but the last statement is just going to be a pain when someone adds another line at the bottom and forgets to add a semicolon on the previous line. When adding the second statement to a binding you're less likely to forget it because you also have to add the braces.

regards,
Ulf



More information about the Development mailing list