Reply to post:

What's all the C Plus Fuss? Bjarne Stroustrup warns of dangerous future plans for his C++

Lee D Silver badge

I'm with the foreach guy.

The second you start using a different syntax for the same command (for), and distinguish using obscure symbols, and even HAVE things like "auto" type modifiers (which just makes me think of VB "Variants"... shudder...), then you've strayed far enough from the original command to warrant a new keyword.

That line is impenetrable to my programming mind. Can you honestly imagine seeing something like that inside, say, the Linux kernel? Or the LibreSSL library?

C++ just wants to overload absolutely everything, including its own commands, and that quickly turns into a royal mess.

And I can't imagine that the generated code is any better than just using the "obvious" foreach and a type/object that allows iteration, and an obvious array/collection of objects.

For instance, if that loop modifies x, and it's just a reference back to the object inside the collection, that could quickly turn into disaster and it might well be hard to spot.

Honestly, a programming language is like a joke, if you have to explain it, it's not working. Sure, C is hardly as readable as BASIC, but C++ is an order of magnitude more obscure than either, especially when people play with these pretty "tricks".

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon