[Development] Using semicolons in JS (QML)

Sérgio Martins iamsergio at gmail.com
Sat Oct 1 02:28:18 CEST 2016


On Fri, Sep 30, 2016 at 4:43 PM, Shawn Rutledge <Shawn.Rutledge at qt.io> wrote:
> On 30 Sep 2016, at 14:19, Kai Koehne <Kai.Koehne at qt.io> 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 slightly.  (Maybe you think performance isn’t impacted by small things like that, but we are at the same time investing effort into other “optimizations” for which I suspect the runtime performance impact may end up being similarly small.)  So I’ve been following the no-semicolons convention ever since, except occasionally when C++ habits get the better of me.

If you're in a position where semicolons would matter for performance
then maybe you shouldn't be using JavaScript on such device.


Regards,
Sérgio Martins



More information about the Development mailing list