From kde-panel-devel Wed Oct 31 06:34:49 2012 From: Dmitry Ashkadov Date: Wed, 31 Oct 2012 06:34:49 +0000 To: kde-panel-devel Subject: Re: QML style guide Message-Id: <5090C689.7070909 () rosalab ! ru> X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=135166531509097 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============8766697297726220569==" This is a multi-part message in MIME format. --===============8766697297726220569== Content-Type: multipart/alternative; boundary="------------020908060400090004020402" This is a multi-part message in MIME format. --------------020908060400090004020402 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 30.10.2012 21:33, Martin Gräßlin пишет: > 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. > +1 for brace on the same line for JS. jslint.com: Expected exactly one space between ')' and '{'. --------------020908060400090004020402 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
30.10.2012 21:33, Martin Gräßlin пишет:
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.

+1 for brace on the same line for JS. jslint.com: Expected exactly one space between ')' and '{'. --------------020908060400090004020402-- --===============8766697297726220569== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============8766697297726220569==--