On Tue, Nov 6, 2012 at 2:26 PM, Aaron J. Seigo <ase...@kde.org> wrote: > On Tuesday, November 6, 2012 15:08:21 Dmitry A. Ashkadov wrote: >> Please, notify us when QML style guide is approved if it isn't approved yet. > > Indeed... I think it is ready to go now, though it still needs more content > (esp the "best practices" section) but that's future work. > > I adjusted the guide to have "on first line opening brace for functions": > > function foo() { > ... code in kdelibs style ... > } > > as that was the consensus on this list. > > otherwise, everything seem to be agreeable.. so let's all start using it! > > -- > Aaron J. Seigo > _______________________________________________ > Plasma-devel mailing list > Plasma-devel@kde.org > https://mail.kde.org/mailman/listinfo/plasma-devel >
Sorry for dropping in late. I haven't read all of the posts, only the first ~10. Why can't the style follow the C++ style as close as possible? For instance: Item { ... } function someFunction() { } That's how the C++ spec looks and it seems obvious to me to use the same style for javascript as well. In the above i interpret "Item" as "class" thus the brace should be on the next line. The functions are just like C++ functions. Further more i find code a lot more pleasant to read if the brace characters are on a new line rather then the same line. Now i can't ask to put the brace on a new line for all cases, but i do ask to follow the C++ style where possible. _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel