KWin Adds Support for QML Decorations 30
As part of a KDE-wide effort to prepare for Qt 5/QtQuick2, and a push to improve the window manager, KWin now sports QML decoration support. Currently, the C++ API for decorators is "...not very Qt like and requires a strong understanding of how the window decoration in KWin works ... [and] seems to be too difficult to be used." This complexity increases maintenance burden: "In 4.9 we ship four window decorations: the Aurorae theme engine, Oxygen, Plastik, b2 and Laptop. Together they are 10 kSLOC of C++ code and 1 kSLOC QML code (Aurorae). Before Aurorae got ported to QML the size of the decorations was 13 kSLOC. Overall that is about 10 per cent of the KWin source base, which is rather large." Basing his work on the QML version of the Aurorae engine, Martin Gräßlin set out to port Plastik to QML (the C++ version has already bitrotted, and was slated for removal): "After one and a half days of work I’m proud to say that writing decorations in QML is possible. ... In the current state the decoration consists of 370 lines of QML code and I expect to need an additional 100 lines to finish the buttons (they are already functional, that is the close button closes the window) and add some of the configuration options. The same API in C++ consists of 1500 lines of code. So we do not only get fewer lines of code but also a more readable and easier to maintain codebase. For something like a window decoration a declarative approach is much better suited than the imperative C++ way of painting elements."
go KDE (Score:1, Interesting)
is gnome dying? staring into the abyss — Swfblag http://goo.gl/6EZra [goo.gl]
Re:Performance change? (Score:4, Interesting)
Oh please. "Crappy" is an opinion, nothing more; everyone says the exact same thing about every other language, whether it's C++, C#, Java, C, Python, Perl, VB, PHP, etc. They don't like C++ because it's too complex; they don't like Java because it's too verbose and doesn't have pointers, they don't like C because it's too low-level, they don't like Python because it doesn't have braces and uses whitespace, they don't like C-syntax languages because they do have braces and don't use whitespace, they don't like Perl because there's too many ways of doing the same thing, they don't like other languages because there aren't a million ways to do the same thing, etc. Javascript is an interesting language because it has some aspects of functional programming, which you don't see in most other mainstream languages. The main problem with it, for applications, is probably that it's limited in capabilities (namely I/O) because those aren't needed for something running inside a web browser, but those could be added on.
Of course the performance isn't great; what do you expect from something you download in source form from a website and then compile on the spot before running? At least it isn't all interpreted like it used to be 10 years ago.