Live data from Hacker News

We have C++14

isocpp.org

11–20 of 353 posts

Re: We have C++14

#11
I really like the direction C++ is moving in. I just really don't like how incredibly VERBOSE it is (though `auto` helps).

Re: We have C++14

#12
When I started writing C++ around 5 years ago, I had a perception that it was a language that is "on its way out". As I learned more and more of it, I've been super impressed at how modern it is becoming, and how it is adapting to overcome its perceived flaws. It is becoming a killer language to me: blazing fast, modern, ubiquitous, stable, and expressive.

Re: We have C++14

#14
post #11

I really like the direction C++ is moving in. I just really don't like how incredibly VERBOSE it is (though `auto` helps).

In languages like C++ "verbose" means "specific and obvious" which is something you want to have when writing certain kinds of code.

It's annoying, it's a drag on productivity, but in the long run it's arguably necessary.

Some other languages which reduce verbosity by making more things implicit make it harder to understand what's actually going on behind the scenes. You lose a lot of information.

Re: We have C++14

#15
post #6

I'm assuming C++14 will have 1320 keywords and a bunch of weird operators to use so people can ignore it even more than it's being ignored.

If only it were true, the problem is more that c++ as to many meaning for its keywords.

Re: We have C++14

#16
post #6

I'm assuming C++14 will have 1320 keywords and a bunch of weird operators to use so people can ignore it even more than it's being ignored.

Speaking of ignoring things, have you read anything at all about C++14?

Re: We have C++14

#17
post #15
post #6

I'm assuming C++14 will have 1320 keywords and a bunch of weird operators to use so people can ignore it even more than it's being ignored.

If only it were true, the problem is more that c++ as to many meaning for its keywords.

I don't know, it's kind of both. There are too many keywords and operators, and many of those keywords and operators have different semantics in different contexts.

Re: We have C++14

#18
post #11

I really like the direction C++ is moving in. I just really don't like how incredibly VERBOSE it is (though `auto` helps).

In languages like C++ "verbose" means "specific and obvious" which is something you want to have when writing certain kinds of code. It's annoying, it's a drag on productivity, but in the long run it's arguably necessary. Some other languages which reduce verbosity by making more things implicit make it harder to understand what's actually going on behind the scenes. You lose a lot of information.

> In languages like C++ "verbose" means "specific and obvious"

Whoa, no it doesn't. C++ is far more verbose than necessary for things like creating algebraic datatypes or really creating any types.

Re: We have C++14

#19
post #12

When I started writing C++ around 5 years ago, I had a perception that it was a language that is "on its way out". As I learned more and more of it, I've been super impressed at how modern it is becoming, and how it is adapting to overcome its perceived flaws. It is becoming a killer language to me: blazing fast, modern, ubiquitous, stable, and expressive.

This is totally true. The downside, of course, is just how much code exists that is written in pre-C++11 dialects, and how many programmers are trained to write that sort of code.

I like way more of C++11 than I liked of the prior version, but there's just so much that's accumulated over the years. I wonder if breaking backwards compatibility is the key, but then I look at Python 3 and think, well, probably not.

Re: We have C++14

#20
post #11

I really like the direction C++ is moving in. I just really don't like how incredibly VERBOSE it is (though `auto` helps).

In languages like C++ "verbose" means "specific and obvious" which is something you want to have when writing certain kinds of code. It's annoying, it's a drag on productivity, but in the long run it's arguably necessary. Some other languages which reduce verbosity by making more things implicit make it harder to understand what's actually going on behind the scenes. You lose a lot of information.

A lot of C++ verbosity comes simply from bad defaults. Const and virtual should be the default for example, not the other way around. Would stop the virtual destructor ommision problem, and if you need efficiency you could make destructors non-virtual.

Also in the "hiding stuff behind the scenes" department C++ is quite bad.

    SomeClass someMethod(SomeClass a, SomeClass b) {
        ...
    }
is doing a lot behind the scenes. Code below is better but it's longer and less convenient to write.

    const SomeClass& someMethod(const SomeClass& a, const SomeClass& b) {
        ...
    }
And actually C++ code isn't easy to reason about wihtout reading the whole program. It isn't even easy to parse.

What's going to happen when you run this?

    y = f(x);
It may be that f is function, or a type. f may return the correct type to assign to y, or it may return something else and automatically run some conversion. There may be copy constructor and some destructors involved if it's returning object and not reference. It may run overloaded operator= and do anything at all, for example add f(x) to y. Hell, f can also be a class with operator() overloaded, and you would need to track its state to see what will happen.

And we haven't even touched the subject of #define.

It's much easier to reason about Java code for example.

Post reply on HN