QML style guide
Martin Gräßlin
mgraesslin at kde.org
Tue Oct 30 17:33:05 UTC 2012
On Tuesday 30 October 2012 18:16:26 Aurélien Gâteau wrote:
> The only part I don't really like is putting left curly brace on its own
> line for functions because:
>
> - having different conventions for event-handlers and function code blocks
> look inconsistent
>
> - it differs from many coding styles: Qt QML JavaScript, Douglas Crockford,
> jQuery, Node... so I think it is going to look odd and unfamiliar to many
> newcomers.
+1 - I am even not sure whether putting curly brace on new line is JSLint
compliant in this case.
My personal opinion is that here we should try to make writing QML code for
KDE for developers coming from JS/Web world as easy as possible. We should try
to be as close as possible as people expect it and not as close to the C++
world we come from.
I hope that there will be a day where we can go back to write C++ (which we
love) and leave the JS/QML code to the people who love that ;-)
Cheers
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20121030/43d7a0c4/attachment.sig>
More information about the Plasma-devel
mailing list