Remix.run Logo
▲ chris_j 3 hours ago

I'm really torn about C++. I love C++ but there are things that I really don't like about it as well. It's a fantastic language in a lot of ways, but it carries around 40+ years of cruft, of things that you wouldn't do like that if you were inventing a programming language today.

I haven't written C++ professionally for many years at this point, and my memories of using it professionally (pre C++ 11) are not happy ones: having to agree on a strict subset of the language that we were allowed to use, which avoided features that any of the compilers didn't support well, or that my teammates didn't like. Sadly back then the list of forbidden features included templates and namespaces.

But using C++ on personal projects nowadays, and being able to choose which bits of the language to use - and which to avoid - is much more enjoyable. And honestly, the language did get a lot better from C++ 11 onwards.

▲reliabilityguy 2 hours ago | parent [-]

What was the objection to namespaces?

▲degaart 2 hours ago | parent [-]

Try to follow the WinUI 3 tutorials. You'll understand.

▲pjc50 an hour ago | parent | next [-]

Could you elaborate please?

WinUI3 is awful for unrelated reasons. It's even a pain to use from C#, which is the language it (and the WinRT APIs) were designed to be the primary use case with. And of course C# namespaces work fine.

Newer Windows APIs are annoying to work with from C++, which is Microsoft's fault but signals something about direction.

▲reliabilityguy an hour ago | parent | prev [-]

I’m sorry, but this is very lazy non-answer.

If you have specific pitfalls to share, do so, otherwise what’s the point of commenting?