[Development] Re : QRegularExpression work

André Pönitz andre.poenitz at nokia.com
Tue Jan 24 12:02:07 CET 2012


On Tuesday 24 January 2012 11:30:50 ext Giuseppe D'Angelo wrote:
> 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/.
> [...]

Right. And we generally do have the rule "no abbreviations".

But I think this case is special. "regex" (or "regexp") are used as "proper"
words in normal talk, like "url", and we do have "QUrl" for that, and we
also try to make the API convienient to use.

For the similarity of QRegExp and QRegex I agree there's some potential
for confusion, but QRegExp vs QRegularExpression is not exactly without
potential for confusion, either.

More similar to std and boost, less line noise when reading...

Regards,
Andre'



More information about the Development mailing list