← Back to context

Comment by flohofwoe

1 day ago

> for (auto const & ess : esses) {

This is allowed by Orthodox C++

> dynamic_cast<Derived> (base_ptr)

This isn't because it requires RTTI, but dynamic_cast is also a typical code smell.

Orthodox C++ isn't generally against new C++ features, it only advices to wait about 5 years (or at least one C++ version) for stabilization and to apply some common sense before adopting them.

The notes about not using RTTI, exceptions and stdlib features that allocate under the hood are all justified by painful experience with those things in the context of game development.

In general, the restrictions outlined in the post make a lot of sense when considering that Branimir (of BGFX fame: https://github.com/bkaradzic/bgfx) is coming out of the game dev hemisphere, and from that PoV none of the restrictions are controversial - on the contrary, it would be highly controversial to suggest going all in on Modern C++ features ;)

> This is allowed by Orthodox C++

I can see no rationale for this whatsoever. It is nothing but syntactic sugar.

> Branmir (of BGFX fame

Appeals to authority don't really work for me.

I've been writing a cross-platform DAW (0) for 25+ years, in C++, and what a game dev has to say about the language in their own work might be of passing interest but not much more.

Being aware of the pitfalls of particular features of a language is an important task for anyone programming in that language. But that doesn't mean that the language is fundamentally broken or that programmers cannot make their own choices about which features to use.

(0) on at least the same level of complexity as a modern game

  • Your level of vitriol and anger at someone expressing an opinion is really weird.

    Literally everyone who uses C++ decides which features to use/embrace and which to avoid. Someone sharing their particular preference is pretty normal and fine.

    > Appeals to authority don't really work for me. I've been writing a cross-platform DAW (0) for 25+ years, in C++

    I love how you reject appeal to authority and then try to establish yourself as an authority. That’s cute.

    • Which wording was vitriolic and angry?

      I wasn't seeking to establish my own authority in any way: "X is brilliant, we should listen to them" being countered by "there are lots of people with similar levels of experience with this thing who have many different opinions (I happen to be one of them)" isn't an appeal to authority. But sure, I could have left out the ("I happen to be one of them") part without changing my point much.

      TFA is not about someone sharing their preferences. It's a direct call to not use many features, and claiming that to do otherwise is a mistake. Here's an example of sharing preferences:

      "I've often tried to use C++'s variadic function templates, but I've found that just using initializer lists tends to be simpler and more readable".

      Here's an example of how TFA would put that:

      "do NOT use variadic function templates"

      2 replies →