[PATH] fix broken mac build on old clangs.
Lubomir I. Ivanov
neolit123 at gmail.com
Mon Nov 9 03:28:48 PST 2015
On 9 November 2015 at 08:57, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> What we have in master works.
if something can't be written in plain old C++ then it's probably
badly engineered, lazy or feature hungry.
>
> I have no interest in seeing Subsurface code made unreadable by C++11
> features -
i'm sure a lot of people here will concur.
> literally every thing I have seen so far from C++11 I find a) annoying b)
> not an
> improvement.
>
and the compile times climb up...a bit too much, for a set of features
that won't receive 100% coverage. i have benchmarked that in a side
project.
>
>
> if(PluginManager::instance().socialNetworkIntegrationPlugins().count()) {
> QMenu *connections = new QMenu(tr("Connect to"));
> - for(ISocialNetworkIntegration *plugin :
> PluginManager::instance().socialNetworkIntegrationPlugins()){
> + Q_FOREACH(ISocialNetworkIntegration *plugin,
> PluginManager::instance().socialNetworkIntegrationPlugins()){
> QAction *toggle_connection = new QAction(this);
Java has that since 2004/2005. and it's a nice feature.
for compatibility, a plain old for(int i = 0; ...) or the Qt macro is
the way to go.
>
> const;
> private:
> PluginManager();
> - PluginManager(const PluginManager&) = delete;
> - PluginManager& operator=(const PluginManager&) = delete;
> + PluginManager(const PluginManager&){};
> + PluginManager& operator=(const PluginManager&){};
> };
>
this delete/default feature is solving a visibility problem and is quite valid.
there are ways around the problem in plain C++, but not very optimal ways.
this new C++ syntax is similar to how pure virtual methods are
defined, so i don't mind it that much
(because the old syntax was weird and i'm used to it).
>
> What is removed there to go back regular C++ is plain syntactic nonsense...
> the code that it brings back is actually readable and makes sense. So why
> would
> I want to spend time to figure out how to allow C++11 code in Subsurface?
>
> And don't get me started on the syntactic bullshit that is lambdas in C++. I
> can't
> believe that I was tired enough to let that shit slip through in Tomaz'
> patches.
i will probably NAK a lambda patch if i see one, because they
introduce a bad programming practice.
i've been doing the same (the NAKing part) for code written in
ECMAScript based languages that had anonymous function for 18 years.
i think the <functional> stuff in C++11, should receive more attention
from developers than lambdas.
real function object are a very powerful feature - they render the
meta compiler in Qt pretty much obsolete.
2c
lubomir
--
More information about the subsurface
mailing list