[Development] Re : QRegularExpression work
Giuseppe D'Angelo
dangelog at gmail.com
Tue Jan 24 11:30:50 CET 2012
Hello,
On 24 January 2012 09:10, Davet Jacques <davetjacques at yahoo.fr> wrote:
> "QRegularExpression" is such long and inconvenient name, even worse with suffix like "QRegularExpressionMatch".
>
> Why not simply use "QRegex"? In addition to shorter, it would also fall in line with "std::regex" and "Boost.Regex".
>
> I realize it may be easier to confuse with the old "QRegExp", but you have to ask yourself, what is more important - minimizing confusion for short-term (Qt 4 -> 5 transition), or having nice and practical name for long-term (Qt 5 lifetime).
Honestly I don't think that "long" names are a bad thing /per se/. Qt
is full of classes with long names¹
("QDeclarativeNetworkAccessManagerFactory"?). The important thing for
a name is to be descriptive², and Qt seems to be trying to follow that
policy. Moreover noone objected to the QRegularExpression* set of
names in the other thread where I discussed the API, so the names
stuck. That having been said, my target wasn't the API freeze, but the
feature freeze. We're still in time to change the API if it makes
sense. I'm open to any opinion or suggestion in that regard.
Cheers,
--
Giuseppe D'Angelo
¹ Class naming in Qt http://bit.ly/mb1RgR
² And you can use the nice Creator's feature so that typing f.i.
"QNAM" and pressing ctrl+space auto-completes it into
QNetworkAccessManager!
More information about the Development
mailing list