2 ms·
Sorry, I should have made it clearer - there is no issue with either one of these. I was trying to point out that in some industries(like video games, at least
by gambiting 5y ago
Sorry, I should have made it clearer - there is no issue with either one of these. I was trying to point out that in some industries(like video games, at least where I work - big AAA studio with proprietary engines) the adoption of new C++ features is so glacial, that even relatively inoffensive things like auto or foreach are still being frowned upon. I said in another comment that there is a technical reason why foreach loops are not used sometimes - because we make custom containers for everything and sometimes these containers don't work well in foreach loops(or at all) - it's fixable, but it's easier for the engine to just implement a blanket ban. For us, visibility and explicitness of everything you do is absolute king, and anything that hides types or number of iterations in a loop(!!!) is met with suspicion. I don't necessarily agree, but I see a lot of comments in this thread saying "oh C++ is such a difficult language to learn as a newcomer" - I'm like.....no? Just because these new features exist doesn't mean you have to use them.