[Qt-interest] A way to test the number... (And a general complain:)
Mihail Naydenov
mlists at ymail.com
Wed Apr 1 17:23:37 CEST 2009
Thank You, all, for Your response!
In general I was just interested for public alternatives to locale().d()->validateChars(...), which test both digits, and notation type, looking for some "official" function...
Which leads me to my side note:
First of all, being new to Qt, I find it great. Really!
I have however one (relatively big) complain:
Two of the greatest benefits of open source platforms is that one can see how things work, instead of relaying on doc and forum posts, and thus use the API (much) better.
Second, if one wants to extend something, does not matter how complex, again can look at the source and Do It The Right Way, not reinventing/reimplementing the wheel.
This is indeed true for Qt as well - the code is both beautifully written and, in general, well commented, the classes are cleverly done to allow expansion.
But my problem is that, although beautifully written, most (all I have seen so far) of the code relays way to much on using private methods and classes *from other classes*.
This hurts both of the strongest points of open source, I mentioned above:
In order to understand how things work, one have to learn a new API...a secret, undocumented and much less commented API !!!
And the worst part - if one wants to extend something "The Right Way"- he basically cannot.
I know perfectly well the reasons behind private classes (both for information hiding and ABI compatibility),
but *strongly* believe using private classes and methods *from other classes* should be used only in extreme circumstances,
all relatively higher level code (like most widgets and utilities) should be achievable from the public API of the lower levels, in reality this clearly is not the case.
Next comes the common definition of friend classes. This does not heard the understanding that bad, but create a bound between classes, granting them special powers, unreachable by mortals.
Yes these give power, and yes, in end the public API is clean and simple as promised,
but every time I see one of these, and that's quite often, I feel like second-class citizen in Qt code.
I don't know, maybe its c++, maybe Qt is to complex to be build in other way, maybe its build more to be used from the higher level, not to be extended and used as a base...
as I said I consider myself a beginner, I really don't know.
And this is not really "a complain", its more like... "my little disappointment" with Qt.
Thank You.
MihailNaydenov
More information about the Qt-interest-old
mailing list