Hacker News new | past | comments | ask | show | jobs | submit login

Variadic templates are absolutely fantastic though as it allows you to have tuples<>, it allows you to have more type safety for printf() (An example can be found on Wikipedia), and it allows all kinds of new and exciting code to be written that uses it for fantastic purposes. (I used it to write a filter interface that at compile time allows you to add multiple filters into a chain. The amount of filters is unlimited because of variadic templates).

I write C++ code for a living, I also write in Python for that same living, and I have to say that C++ allows me to write safe reliable code just as well as Python. There is definite code-reuse, readability and security.

As for a complex language ... what programming language isn't complex, while still having full power?

As for the "obtuse warning and error messages", those are being worked on. Those didn't get solved simply by switching to a different language, that is something every single programming language is still working on... I still get errors in Python every so often with a huge stack trace and still have issues trying to figure out why it failed! Using clang and newer versions of gcc you now get error messages that are easy to read, easy to understand and in most cases the compiler will even tell you what you got wrong and suggests possible fixes.

I too love C++, I love C++11 and what it brings to the table. I am currently still targeting an older versions of the STL, mainly due to the fact that on OS X most C++ code is compiled against libstdc++, especially third party code, which is incompatible with libc++ when it comes to string handling. BUT I do get to take advantage of the language features, auto, variadic templates, iterator based for loops that are created for me, and lambda's.

The other thing with the new STL is that it allows the developer to write less code, and let the STL take care of cleaning up after itself. It is more exception safe, with shared_ptr<> and friends, and provides a native way to do threading without requiring calls into platform dependant code (it is abstracted away), atomicity and other tools that will help make C++ on multi-threaded/multi-core systems to do more work in parallel!

C++ has come a long way, C++11 is absolutely fantastic and has only made C++ even better than it has been before. It is a shame that valid C++ 11 code will not compile on VS2012 as it will mean we still have to do various hacks to get the same features on the Microsoft Windows platform.




It will also fail to compile with the latest C++ compilers from IBM, HP and Oracle. I don't see anyone complaining about them.

Or their lack of C99 and C11 support for that matter.


Let's look at the platforms currently in heavy use:

  1. Windows
  2. Mac OS X
  3. Linux
  4. Some form of BSD
  5. Oracle Solaris/HP-UX/IBM AIX
Compiling for the top three platforms solves 99.999% of my problems, especially if my code is meant to be used on the desktop. For the windows platform's primary compiler to not have support for standard C++11 features is definitely a deficiency.


You have Intel C++, Portland Group C++, C++ Builder, MinGW at your disposal besides Microsoft, just pick another vendor.

Vote with your pocket.


> It will also fail to compile with the latest C++ compilers from IBM, HP and Oracle. I don't see anyone complaining about them.

Because GCC is easily available on those systems. Well and the fact that those systems are far from being mainstream and come with a bunch of their own issues.


In the Fortune 500 world I work on, those systems are pretty mainstream.

There are even AS/400 and VMS systems to play with.


But that world is too small and conservative in regard of language adoption.


Sure, but that is the world compiler vendors mostly listen to.


HP, IBM, and Oracle?

btw. the IBM XL C++'s support for C++11 seems to be as good as the one in VC++ 2012. They don't have lambdas but variadic templates instead.


I mean most compiler vendors only care about big companies nowadays, since most startups don't want to pay for development tools.

No standards driven language gets fully support at the same time across all vendors.


Thing is, though, I think it's fairly safe to say that the main compiler "vendors" are Microsoft, GCC, and Apple to some extent. The vast majority of software is produced either using Visual Studio, gcc, or Apple's version of gcc, or clang.

Visual Studio is (sadly) the gold standard on Windows. It may not be free, but companies (including startups) will pay for it if they need it. GCC is of course free, as is clang. You'd be foolish to pay for a toolchain unless you have very specific needs. So what other compiler vendors that make money off their toolchains are actually relevant for all but niche uses? I'd guess that their aren't any, but I can't claim to have comprehensive knowledge of everyone's toolchain needs.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: