Qt, range-based for loops and structured bindings
kdab.com
kdab.com
DbResultIterator<int, QString> getUserNames()
I could do something like this: for(auto [id, name] : db.getUserIdsAndNames()) {
// id and name are type-safe int and QString
}
vector<QString> v;
ranges::transform(db.getUserIdsAndNames(), [](int id, const QString& name) {
return name.toUpper()
}, back_inserter(v));
Internally the iterator would wrap QSqlResult and decompose the template argument pack, calling specialized functions such as result.data(0).toString()
knowing the index and type due to the definition of DbResultIterator<...>.Unfortunately I cannot share the code here because of copyright, but I can recommend it.
(I used to work for KDAB until three years ago. I noticed the good cookies dialog yesterday.)
But since GDPR many webpages do not work, since they have a consent dialog that can only be confirmed with javascript. It is very annoying
The idea of the GDPR was, presumably, to suggest that publishers and other industry actors might like to change their ways. If they were to keep doing what they had been doing, in terms of personal data collection and sharing, it would require such specific and explicit opt-ins for every single reader that no publisher would think it was a worthwhile tradeoff any more.
But the choice of the publishers has been to do that - to place those specific and explicit opt-ins in front of their readers, to offload to their readers the hard work of changing their ways instead of changing them themselves.
Just remember that following the letter and not the spirit of the law usually only flies in the US
We also never talk about the GDPR's general enforcement history.
Cookies are a built-in feature of web browsers, if you don't want them you can disable them or periodically flush them, otherwise yes, I want to automatically ignore this problem. I don't see why killing web usability was overall a good thing, even if it brought this tracking problem to the forefront, it certainly isn't fixing it, it's only making the web harder and more annoying to use.
GDPR may be well intentioned but what happened to the web as a result was a total failure imho.
Especially the sites that have notices like “We value your privacy... so here’s 50 third parties we share your data with that you have to individually opt out from”. If they truly valued my privacy, they wouldn’t be sharing my data with so many third parties in the first place. They wouldn’t need to tell me and let me opt out.
Before GDPR, I’d have to read privacy policies to find out who doesn’t value my privacy, but now, after GDPR, the websites tell me with an in-your-face banner so I know to close the tab.
Anyways: Website operators could easily avoid it and not invade users privacy. I doubt for a consulting companynlike KDAB there really is need for it. It's just a "default" feature of web sites to report all sorts of usage data to adtech companies.
Deliberately butcher your own site rather than respecting you users?
Don't use plugins to avoid this. Avoid the sites that do this.
It is a reasonable price to pay to make the web habitable.
Edit: and if you are desperate, sure visit the site anyway. But the inconvenience of those popups is a feature - to remind you what the people behind the site really think of you.