LWN.net Logo

Actually C++98 is great counterexample...

Actually C++98 is great counterexample...

Posted Jul 22, 2011 8:22 UTC (Fri) by Cyberax (✭ supporter ✭, #52523)
In reply to: Actually C++98 is great counterexample... by khim
Parent article: Poettering: systemd for Administrators, Part IX

Oh, come on.

Most of compilers coped with C++98 standard by dying. There are only 5 compilers that implement it: gcc, EDG-based compilers, MSVC, clang (still incomplete) and little-known Russian C++ compiler. And even they implemented it YEARS after the standard had been published.

C++ Standard library is choke-full of design bugs (like how swap() between containers with different allocators can possibly work in O(1) time) and is incomplete (that's why instead of std::string various bike-shedded replacements were used).

Other parts are just stupid, like the "typename" keyword or 2-phase name lookup.


(Log in to post comments)

Actually C++98 is great counterexample...

Posted Jul 22, 2011 15:11 UTC (Fri) by khim (subscriber, #9252) [Link]

Most of compilers coped with C++98 standard by dying.

Huh? What this has to do with anything? Most compilers were already dying when C++98 was published. When GCC surpassed a lot of commercial offers they become redundant.

There are only 5 compilers that implement it: gcc, EDG-based compilers, MSVC, clang (still incomplete) and little-known Russian C++ compiler.

Only five? Is this a joke? The whopping five! Five is huge number. How many independent WebSQL implementations are there? How many TCP/IP stacks? Five is decent number in comparison. But the fact that surviving compilers actually implemented C++98 (and as you've noted there are at least five independent implementations) is nothing short of amazing.

Other parts are just stupid, like the "typename" keyword or 2-phase name lookup.

They are useful. That's why they are implemented by most compilers out there. Really stupid things (like "export templates") are just omitted - but there are very few such things in C++98.

C++98 is pretty decent standard - much better then a lot of other standards (both "design-first" and "implement-first" ones). And ditto for POSIX. You may hate them for some reason, but please be objective.

Very few standards are so clear and have such wide support. How many independent implementations of ECMA-234 or ECMA-376 you know? How compatible they are and how useful? Sorry, but as broken as C++98 is (and nothing is perfect so I doubt you can name even one substantial standard without few insane forgotten things in it) these are much worse - and they were created as you recommended: create something really working and only then standardize it.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds