Live data from Hacker News

We have C++14

isocpp.org

41–50 of 353 posts

Re: We have C++14

#41
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.

um, C++ is the most widely used language in the world.

We have this notion of "trolls", but troll means someone that specifically tries to stir discussions or invite responses, by saying controversial stuff on purpose.

I think the parent's comment is just plain ignorant. Saying stuff that he thinks is "cool" because he doesn't know better.

Re: We have C++14

#42
post #40

Earlier quoted context omitted.

Meh, breaking backwards compatibility isn't all that bad. It will be a bit rough for a few years, but it's worth it to clean things up for a brighter future.

The example of Python 3 is a good one. "A bit rough for a few years" might be an underestimation.

I don't think Python 3 is a good example. Unlike other cases where languages broke backwards compatibility, the Python community actively discouraged upgrading for years, constantly saying "don't use Python 3" for years, and Python 2 was actively maintained in parallel to Python 3, with features constantly being back-ported. It would have been much smoother overall if they'd just dropped Python 2 altogether, even if a little more painful up-front.

Re: We have C++14

#43

OT question: I was playing with some C over the weekend (not C++), trying to figure out how to handle Unicode in a way that would work on Mac, Linux, and Windows. Despite a couple hours googling and reading, I couldn't answer really basic stuff, like: - Do I use char* for strings? It sounds like wchar_t is 16 bits on some systems and 32 on others, so I should avoid it? - If I want to read & write UTF-8 files, how do…

Look here: http://userguide.icu-project.org

You really need a library when dealing with unicode, if you are doing anything advanced.

How do you split a sentence into words? Spaces, right? Oh, Chinese doesn't have spaces.

How about sentences? Paragraphs? Even characters are a pain to iterate over.

Re: We have C++14

#44
post #39
post #31

Earlier quoted context omitted.

Because if the compiler can not figure out how to de-virtualize your usage of a structure then you're going to necessitate that a vtable be created at compile time and used at runtime. The reason the previous commenter asked if you're from the java world is because in many highly important areas, the effect on memory and speed this would cause would be unacceptable. These areas _tend_ to be left to people who underst…

I don't know which world I'm from. I mostly program (for money) in java nowadays, but I also did C++ for money for like 6 years, and I knew C years before. And mostly I've learnt programming on turbo basic and turbo pascal. But never had to do system programming. Also I don't think it's that big of an achievement to understand C. Despite its flaws it's very simple language, very different from C++. To the point - you…

Performance is only one side of it. The bigger reason is http://stackoverflow.com/a/814939

Re: We have C++14

#45
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.

You should check out what's planned for C++17 https://isocpp.org/std/status if you haven't yet.

Re: We have C++14

#46
I'm a little afraid the language will go down hill from here. Too many versions - a committee dedicated to creating new versions of the language standard is going to do exactly that. Much like has happened with OpenGL.

Re: We have C++14

#47

OT question: I was playing with some C over the weekend (not C++), trying to figure out how to handle Unicode in a way that would work on Mac, Linux, and Windows. Despite a couple hours googling and reading, I couldn't answer really basic stuff, like: - Do I use char* for strings? It sounds like wchar_t is 16 bits on some systems and 32 on others, so I should avoid it? - If I want to read & write UTF-8 files, how do…

Why not just write C style C++? I never understand the arguments to use C anymore - you can write C style C++ and get on with your life, and cherry pick the features you want.

In C++ unicode is as simple as: string s = u8"This is always a utf8 string.";

Re: We have C++14

#48

Earlier quoted context omitted.

> 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.

Or looping through for loops. I remember the jaw-hitting-floor moment when my C++ book tried to pass off std::vector ::iterator it; for (it=arr.begin(); it!=arr.end(); it++) { ... } as an improvement over for (int i=0; i Not entirely unrelated: I'm currently busy verbosifying a large chunk of C++11 code into C++90 code because Reasons (or so the maintainers assure me).

It's an improvement in the sense that it's more general; you can loop through any container that implements that protocol, which most (if not all) of the STL containers do. For example,

    template 
    void foo(T arr)
    {
        for (auto it = arr.begin(); it != arr.end(); ++it)
        {
            std::cout 
You could pass a `std::map` to `foo`, or a `std::list`, or a `std::vector`. You could even create your own classes and give them to `foo`, as long as they implement the `begin`/`end` protocol.

It's certainly more verbose than necessary, but it can be convenient.

Re: We have C++14

#49
post #38

Earlier quoted context omitted.

It's really neither here nor there, but every java or JavaScript engine in widespread use is written in c++, so c++ code "in use" subsumes both of them.

No language exists but x86 binary code!

Um, ever hear of ARM? (Also 680X0, IBM mainframes, 8051, Itanium, Sparc...)

But then I presume the parent was sarcasm.

Re: We have C++14

#50

I apologize if this is ignorant, but how is C++ versioned?

By the year the standard was published.

Fairly common programming language convention as well. I believe FORTRAN 66 and ALGOL 68 were the first standards widely referred to with a revision year. More recent examples include Fortran 90 (no more caps!) and C99.
Post reply on HN