Re: [Development] Using semicolons in JS (QML)

2016-10-04 Thread Viktor Engelmann
Am 30.09.2016 um 17:43 schrieb Shawn Rutledge: > Back in Nokia times it was said that we shouldn't use semicolons, > because it would speed up the parsing [...] As someone who has written countless parsers, I *highly* doubt that this is actually true. Indenting with tabs was also believed to be *

Re: [Development] Using semicolons in JS (QML)

2016-10-04 Thread Simon Hausmann
day, October 4, 2016 10:13:21 AM To: Olivier Goffart Cc: development@qt-project.org Subject: Re: [Development] Using semicolons in JS (QML) > On Oct 1, 2016, at 8:33 AM, Olivier Goffart wrote: > > On Freitag, 30. September 2016 15:43:57 CEST Shawn Rutledge wrote: >> Back in Nokia

Re: [Development] Using semicolons in JS (QML)

2016-10-04 Thread Eike Ziller
> On Oct 1, 2016, at 8:33 AM, Olivier Goffart wrote: > > On Freitag, 30. September 2016 15:43:57 CEST Shawn Rutledge wrote: >> Back in Nokia times it was said that we shouldn't use semicolons, because it >> would speed up the parsing and reduce the size of resources slightly. [...] > > Back in

Re: [Development] Using semicolons in JS (QML)

2016-10-03 Thread Shawn Rutledge
> On 30 Sep 2016, at 23:57, Robin Burchell wrote: > > For Qt, while I would like to see one or the other picked and followed > for consistency's sake, I'm not sure it would be a useful investment of > your time to try to enforce a particular semicolon-style without tooling > enforcement, as it s

Re: [Development] Using semicolons in JS (QML)

2016-10-02 Thread Mitch Curtis
> -Original Message- > From: Development [mailto:development-bounces+mitch.curtis=qt.io@qt- > project.org] On Behalf Of Robin Burchell > Sent: Friday, 30 September 2016 11:57 PM > To: development@qt-project.org > Subject: Re: [Development] Using semicolons in JS (QML) &

Re: [Development] Using semicolons in JS (QML)

2016-10-02 Thread Mitch Curtis
i Koehne Sent: Friday, 30 September 2016 11:00 PM To: Shawn Rutledge ; development@qt-project.org Subject: Re: [Development] Using semicolons in JS (QML) >> To make a proposal: Let's use semicolons in imperative JS parts of QML in >> our examples and documentation > > Ba

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Olivier Goffart
On Freitag, 30. September 2016 15:43:57 CEST Shawn Rutledge wrote: > Back in Nokia times it was said that we shouldn't use semicolons, because it > would speed up the parsing and reduce the size of resources slightly. [...] Back in Nokia times, someone was reviewing a patch and made a comment that

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Sérgio Martins
On Fri, Sep 30, 2016 at 4:43 PM, Shawn Rutledge wrote: > On 30 Sep 2016, at 14:19, Kai Koehne wrote: >> To make a proposal: Let’s use semicolons in imperative JS parts of QML in >> our examples and documentation > > Back in Nokia times it was said that we shouldn't use semicolons, because it >

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Robin Burchell
On Fri, Sep 30, 2016, at 11:00 PM, Kai Koehne wrote: > Interesting. Indeed, I wouldn't have thought it makes any measurable > difference. IIRC we had a qml mimizer once, I guess this is still around? tools/qmlmin in qtdeclarative > It's certainly not that important to me that I will spend a day o

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread André Pönitz
On Fri, Sep 30, 2016 at 03:43:57PM +, Shawn Rutledge wrote: > On 30 Sep 2016, at 14:19, Kai Koehne wrote: > > To make a proposal: Let’s use semicolons in imperative JS parts of QML in > > our examples and documentation > > Back in Nokia times it was said that we shouldn't use semicolons, beca

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Kai Koehne
ai From: Development on behalf of Shawn Rutledge Sent: Friday, September 30, 2016 5:43:57 PM To: development@qt-project.org Subject: Re: [Development] Using semicolons in JS (QML) On 30 Sep 2016, at 14:19, Kai Koehne wrote: > To make a proposal: Let’s use semicolon

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Shawn Rutledge
On 30 Sep 2016, at 14:19, Kai Koehne wrote: > To make a proposal: Let’s use semicolons in imperative JS parts of QML in our > examples and documentation Back in Nokia times it was said that we shouldn't use semicolons, because it would speed up the parsing and reduce the size of resources sligh

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Olivier Goffart
On Freitag, 30. September 2016 12:19:09 CEST Kai Koehne wrote: > Hi, > > It’s Friday, so time for some bikeshedding ;) > > > As you might know, the semicolon as a statement separator in JavaScript is > optional. Technicly, that's more complicated than that. The semicolons are mandatory. But i

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Marco Piccolino
I am also already abiding to the practice of using semicolons between curly braces and no semicolons for simple bindings. Marco Piccolino ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Michael Zanetti
FWIW, in unity8 (reasonably big QML application) we agreed to not use semicolons for declarative code unless you really want to write some things into a single line and need them, but always use semicolons for imperative code. This has served us very well over the past years, seems consistent and

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Alexander Nassian
I personally use semicolons always when {} is incorporated. And {} I'm using when its more than a single statement. Beste Grüße / Best regards, Alexander Nassian, bitshift dynamics GmbH___ Development mailing list Development@qt-project.org http://lists

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Ulf Hermann
4. If the semicolon makes you feel angry, feel free to arbitrarily add (or remove) semicolons to make you feel better. ;;

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Andreas Aardal Hanssen
2016-09-30 14:19 GMT+02:00 Kai Koehne : > 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 > > im

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Ulf Hermann
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 bra

Re: [Development] Using semicolons in JS (QML)

2016-09-30 Thread Konstantin Tokarev
30.09.2016, 15:19, "Kai Koehne" : > Hi, > > It’s Friday, so time for some bikeshedding ;) > > As you might know, the semicolon as a statement separator in JavaScript is > optional. That is, most of the time you can just separate commands > > by newlines. There are a few pathological cases [1] th

[Development] Using semicolons in JS (QML)

2016-09-30 Thread Kai Koehne
Hi, It’s Friday, so time for some bikeshedding ;) As you might know, the semicolon as a statement separator in JavaScript is optional. That is, most of the time you can just separate commands by newlines. There are a few pathological cases [1] though where a semicolon is needed. It seems the J