Modern C++ in demos

category: code [glöplog]
still fun to have it ;-)
added on the 2020-05-17 13:00:26 by hollowone hollowone
Navis: For demos, leaks don't really matter, as long as you don't keep leaking new memory per frame. If you ever make a demotool, it's a bigger problem, but I guess you don't. :-)
added on the 2020-05-17 17:42:14 by Sesse Sesse
well usually the best tactic as I also see followed here is to separate the demo engine player with some data layer to interpret the flow and the the tool that creates the data-set to be interpreted in the player.

If that's the case then you can separate the platforms for the tool and the actual running engine.. but in such a case I believe for size/speed optimization choosing clean C code over C++ is still more in favor.

I believe the biggest advantage of modern C++ standard is that it tries not only to be the language but also the platform. Something it had overslept back in the late nineties and noughties. And that's how you must understand the modern C++ as a platform. I believe as I read you here most of you code C with classes with over-complicated use of generics that outside some specialized focus areas should not be overused in my humble opinion.

One of the reasons why only parts of the standard are recommended above and that's why it comes with mixed opinions here. Very fair to say.

Although Herb Sutter is making a lot of effort to promote the new standards in various ways and he is not the only advocate of it on behalf of the ISO team and organizations + companies that support the evolution, I think it's still never truly adopted by its promotors to compete with other modern generic purpose programming platforms (not languages, I dare to highlight again).

I remember back 10 years ago or so, when at MS I was working more or less directly with various Herb Sutter and Herb Sutter influenced teams. Windows RT was introduced at the same time and I was part of the force to re-evangelize both internal teams and external DEV audience that C++ is back a primary citizen at MSFT.

It all was coming with great promise back then. Lot of Windows 8 subsystems were rewritten to WinRT to support it and I was personally hoping that finally after decades there will be some revolution around Win32 API and COM that I hate so much.. but it did not really buy in and many things dev community that was close to that development had felt it could be the thing... did not even announce itself.

Both Windows 8 and his leader (Sinofsky) failed to deliver at the end and are gone for a while.

But the standard has evolved as one of the byproducts and its not one company that supports it very actively since and not one compiler and dev tool chain that support it very well.

Never the less you must consider modern C++ as a complete platform not the language with its standard library as the extension. That's where it's continually heading (not without new mistakes obviously).

And this is where C++ fails biggest time and it will never convince web developers, mobile developers, AI/ML developers to be a first choice platform for their work. It has lost to Java, C#, Python.. even Javascript many years ago.

I always though that C++ is only a first choice when you do games.

But with ever growing dominance of standard engines and embedded programming platforms in them that are NOT C++ I already see signals that C++ skills are not that critical anymore.

Thus, it's a great platform for fun and education and to have a old-school, anti-pattern, Java-SOA Expert level academic nonsense talk in one of those isocpp.org discussion groups I participate occasionally.

Also I found it perfect for non-important demo-scenial experiments I drive as a hobby these days. Mostly as I find demoscene to go often if not always against the current and reinventing.

That's how this new C++ can be nice to us. Well, of course if you're curious dwell and learn. I did so and my conclusions are already described above.

Summarizing my two more cents added to the discussion and and to respect what immerso wrote: All thoughts here subjective and come from a long retired programmer who now smacks programmers' asses with a god blesses whip to keep their work standard and maintainable and consumable rather than types too much between 9 and 5 himself.

Modern C++ is only for my demo scene experiments as in my pro world, I can't find place for it that makes it unique and considerable.

It's not bad, not the best.. but as I do cloud + web + mobile on my daily business, not games or any other gpu driven work.. C++ became a tricky "COBOL" to have fun with and to feed the sentiment as I really grew up with it, 25 years ago or so.
added on the 2020-05-17 21:22:47 by hollowone hollowone