[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: QML style guide
From:       Dmitry Ashkadov <dmitry.ashkadov () rosalab ! ru>
Date:       2012-10-31 6:34:49
Message-ID: 5090C689.7070909 () rosalab ! ru
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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 '{'.

[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">30.10.2012 21:33, Martin Gräßlin пишет:<br>
    </div>
    <blockquote cite="mid:3853137.vfGQS0jbUV@martin-desktop" type="cite">
      <pre wrap="">On Tuesday 30 October 2012 18:16:26 Aurélien Gâteau wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">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.
</pre>
      </blockquote>
      <pre wrap="">+1 - I am even not sure whether putting curly brace on new line is JSLint 
compliant in this case.

</pre>
    </blockquote>
    +1 for brace on the same line for JS. jslint.com:
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span style="color: rgb(0, 0, 0); font-family: serif; font-size:
      medium; font-style: normal; font-variant: normal; font-weight:
      normal; letter-spacing: normal; line-height: normal; orphans: 2;
      text-align: start; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
      background-color: rgb(243, 232, 219); display: inline !important;
      float: none; ">Expected exactly one space between ')' and '{'.</span>
  </body>
</html>


_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic