

GCC 4.8 Has Automatic Return Type Deduction - AndreyKarpov
http://yapb-soc.blogspot.ru/2012/12/gcc-48-has-automatic-return-type.html

======
ebassi
a three lines program generates 95 lines of error messages; let's throw a
_template_ into it, so that it goes up to 112 lines, but look: at the
beginning you'll see the error we added!

coupled with the: "To be fair, this doesn't entirely replace decltype. auto
doesn't perfect forward. But it seems to work as expected, most of the time"
it goes a great way to instil me a sense of safety.

not.

that post should be taken as an example of why C++ has become a liability, and
the day won't come too soon when this joke on the whole industry finally gets
dumped like COBOL in the nearest ditch, along with the corpses of all the
projects that made the mistake of actually using it.

if it were a living thing, I'd shoot C++ in the face to put it out of its
misery.

~~~
shin_lao
Or you can use Clang.

Feel free to shoot C++ in the face. Don't forget to rewrite most of compilers
and operating systems in use in the process.

~~~
bhaak
Linux doesn't use C++ and AFAIK the BSDs also don't.

So go ahead, I won't have a problem with a dead C++. :-)

~~~
verroq
Then prepare to drop GCC. Then drop whatever browser you are using and most of
the cross platform compatible GUI frameworks (GTK, QT etc).

<https://lwn.net/Articles/390016/>

~~~
bratsche
GTK is written in C, not C++.

~~~
verroq
Sorry was thinking of something else.

------
coliveira
What many people don't understand is that C++ has at least two target
audiences: (1) people writing low level libraries using templates and other
esoteric stuff; and (2) people writing application code. (1) is needed because
C++ is a language that can target multiple environments and operating systems.
The template craziness is necessary to make the system fast and easy to use
for application developers. If you are writing applications, however, you
should try to use only bread and butter features, along with standard
libraries such as STL and semi-standard stuff like Qt. Once you understand
this, your life will be much easier with C++.

------
indeyets
I used to be c++ "guru" some years ago, but right now code like this scares me
as hell. The language is getting less-used and it's a good thing
<http://www.tiobe.com/index.php/paperinfo/tpci/C__.html>

How many years would you give it to stay ubiquitous? I bet on 15 years

~~~
udp
I was just about to make a similar comment. There isn't much about C++98 I
don't know, but having ignored C++11 for too long I feel utterly lost looking
at stuff like this now.

What concerns me even more is that it must be pretty much impossible for a
beginner to pick up C++ today.

~~~
pjmlp
Anyone can pick it up if they really care.

They don't need to know the complete language on day 1.

~~~
fceccon
As a beginner programmer (a.k.a. CS student) I was able to pickup the basic of
the language in the last 2 months and work on a real world (not a school
project, it's a library that other universities use) cuda c++ project. I read
a book so I have an idea of what can and can't be done, but when I need to
implement something unusual (ie function object) I need to lookup it in the
book or ask for help to my mentor. I still need help to understand gcc errors,
cuda uses an "old" version (3.4 I think) so we don't get the improvements of
the new versions.

~~~
pjmlp
Yes, you always need to look things up.

In the projects I take part on, with teams from 20 - 100 developers, you
cannot know everything regardless of the language.

------
nicholassmith
You know when you get in a really fancy sports car and sit down and look at
the console and go "What the fuck?" as your brain tries to parse the myriad of
options relating to _everything_ that are usually highly non-intuitive and
often buried under many layers of cruft and you need to sit and read the
manual that's as thick as a phone book? That's kind of what C++ is getting
towards.

There's a simple solution, don't touch all the fancy and extreme language
features, use the core, keep your sanity. I code in C++ professionally using
Qt, the last time I wrote any code using anything overly fancy was probably
when I was in University. It's often not needed, it's guaranteed to make your
code base a nightmare, and it's usually horrid to read back over. If you're
sensible and put some constraints on what you're doing C++ is a great language
choice, but often people stray into using all these areas of C++ that
basically make the code an unmaintainable mess.

(note, defining core as the things guaranteed to work on 95%+ of current
compilers, if it's non-standard I would really, really thing twice about using
it)

------
kombine
It'll take years before it becomes part of the spec and all other
implementations will catch up. D had it for ages.

------
rbanffy
I'm curious: how popular is it to use syntax that's not available in other
compilers and how often do programmers regret the decision?

~~~
mdonohue
Coverity, maker of c++ static analysis software, and where I used to work, has
published a paper about their experience trying to parse customer code. It
turns out that 'The language people code in? The strings their compiler
accepts'

So yes, it is quite common to use syntax not available in other compilers.
Most code is vetted against only one compiler to begin with.

<http://www.stanford.edu/~engler/BLOC-coverity.pdf>

~~~
fafner
Do you use EDG or another frontend? I can only assume that parsing C++ is
quite problematic especially with all those compiler extensions and the
current transition to C++11.

