2016-09-30 14:19 GMT+02:00 Kai Koehne <[email protected]>:
> To make a proposal: Let’s use semicolons in imperative JS parts of QML in
> our examples and documentation.
>
> Apart from being on the safe side regarding some pathological cases, it
> also makes the difference between declarative QML bindings and
>
> imperative JS code more explicit.
>
I propose to have semicolons based on the following rules:
1. Every second line of js outside of any scope should end with a semicolon.
2. Semicolon for multiline statements inside an if.
3. If whitespace isn't clear enough, add one semicolon to make the code
more readable.
4. If the semicolon makes you feel angry, feel free to arbitrarily add (or
remove) semicolons to make you feel better.
For example:
a = b // ok
a = c; // ok, since it's every second line
a = d; // WRONG drop the semicolon, be consistent for goodness sake
; // good, add a semicolon to emphasize the whitespace
;;; // now you're just being ridiculous
if (a === b) {
a = b;
a = c; // very good!
}
Andreas :-) just trying to help
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development