Live data from Hacker News

Hacker Poll: Is C++ the Language of the Future?

readwriteweb.com

51–60 of 69 posts

Re: Hacker Poll: Is C++ the Language of the Future?

#51
post #40

Earlier quoted context omitted.

I think that indicates poor interviewing more than anything.

People coding in a different subset of C++ is predictable from an interview? Howso? Not that they know it, but that they prefer it and do it to the contrary of people asking them not to. Most other languages it doesn't matter anywhere near as much, as idiosyncrasies can be cordoned off well, but with C++, anyone doing anything strange or incompatible anywhere is a problem for most everyone. That same power and contro…

I think that's a bit dramatic. If a coder can't assimilate into your code base and follow the patterns already in use, they would fail regardless of the language.

Re: Hacker Poll: Is C++ the Language of the Future?

#52
post #47
post #46

Earlier quoted context omitted.

The "C++ is only usable in a subset" meme must die.

If you have to keep engineers around who can handle it, it is. Writing boost heavy code vs STL code vs object oriented code vs prototype based code vs highly functionally styled code vs custom allocated code vs reference passed code vs smart pointer code, interface based code vs heavily multiple inheritance based code vs flat hierarchy mixin template based polymorphism etc. It gets expensive to keep people who do all…

So your argument essentially boils down to "there should be some coding style in a project", which is true for all languages, not just C++.

Re: Hacker Poll: Is C++ the Language of the Future?

#53
post #40

Earlier quoted context omitted.

People coding in a different subset of C++ is predictable from an interview? Howso? Not that they know it, but that they prefer it and do it to the contrary of people asking them not to. Most other languages it doesn't matter anywhere near as much, as idiosyncrasies can be cordoned off well, but with C++, anyone doing anything strange or incompatible anywhere is a problem for most everyone. That same power and contro…

I think that's a bit dramatic. If a coder can't assimilate into your code base and follow the patterns already in use, they would fail regardless of the language.

It's more of a forefront issue with C++. Also, there are tons of ways to write C++, there are very few (relatively speaking) for Java, C, Python, Ruby or Objective-C.

If someone tends to use a different style of dot notation in Obj-C, no biggy, at worse you get a leak or two that an automated tool can find 75% of the time

If someone uses a different type of pointer/reference on a serious chunk of the codebase or a different style of template based inheritance, you're up shit creek really fast.

The language itself has tons of choices all over. The issue is getting everyone on the same page without crushing creative, high spirited people or having to fire otherwise excellent engineers.

I'm not saying the language is useless, I'm saying it is a huge ass staffing pain to get the right mix of engineers who are brilliant and willing to slavishly do what they're told which is hard to find.

Re: Hacker Poll: Is C++ the Language of the Future?

#54

The comments on this page are just like C++ itself - all over the place, some of everything. I heard the same comments in the early 90's, when I was doing exclusively C++. That's why it will still be around 5, 10 and 20 years from now - as long as there's something for everyone to dislike it will also make enough people happy enough to continue using it.

There are two kinds of languages. Those people hate, and those no-one uses.

Re: Hacker Poll: Is C++ the Language of the Future?

#55
post #18

Have you tried to staff a C++ project? If you don't have the ability to easily fire people, it's a horrible pain. There are tons of people who think they know C++. There are a smaller subset that do. If you get people who A> Refuse to follow the subset of the language your group is using on the project or B> deeply misunderstand one or two features, you're in total utter hell if you can't fire the person. Most places…

Well, that's true of many languages, Perl for example has gotten a bad rep because everyone on the project asserts their right to "there's more than one way to do it". S'what code reviews are for.

Re: Hacker Poll: Is C++ the Language of the Future?

#56
post #52
post #47

Earlier quoted context omitted.

If you have to keep engineers around who can handle it, it is. Writing boost heavy code vs STL code vs object oriented code vs prototype based code vs highly functionally styled code vs custom allocated code vs reference passed code vs smart pointer code, interface based code vs heavily multiple inheritance based code vs flat hierarchy mixin template based polymorphism etc. It gets expensive to keep people who do all…

So your argument essentially boils down to "there should be some coding style in a project", which is true for all languages, not just C++.

>which is true for all languages, not just C++

No it's not. Lots of languages have broad based understanding of good and bad based on some body, consensus, etc, that does not have mutually incompatible schools of thought that combust wildly when stuck in the same project.

I've never seen a ruby project with a code style guide.

While I've seen python ones (the language closest to C++ in getting randomly hairy different types), the mixups tend to be relatively benign comparatively speaking. Most python projects go with "Look PEP8ish/pythonic".

Objective-C is heavily driven by WWDC presentations and strong recommendations by Apple, so people tend to move to that.

C is all over the map as well, but again, individual complexity of each decision is much lower. You'll have a style guide at a C dev company. "Use lint with these flags and indent with this specifications" is what the best ones have for a majority of their work.

Perl tends to not care, same for php, whereas I think they really should care more.

C#? I've seen style guides, but they're only on about 10-30% projects.

Java: they're usually there.

>"there should be some coding style in a project",

This all comes out to: making all these decisions in a consistant style is MANDATORY for a C++ project. For most others, there are conventions which don't blow things up that make people work generally to a similar enough style. While there may be some codified choices, with C++ in particular, you have TONS of choices, choices that your staff will not all have the same opinions on, choices you'll have to get them onboard with using, onboard with understanding, and thinking in terms of those mechanisms.

That's relatively hard to do. There's so much ramming shit down people's throats in C++ projects that I think it's only worth it in a small small number of cases.

Re: Hacker Poll: Is C++ the Language of the Future?

#57
post #4

I find a lot of people complain "C++ is too complicated", but personally i don't think its that hard to get your head around... apart from the cryptic template handling. Some of my more interesting projects are C++ based so i have a feeling it's going to stick around for quite a while yet.

I think the problem is less that C++ is too complicated, but rather that it is more complicated than it needs to be at almost all tasks where the major pros of C++ don't matter (eg speed) - you're better of using whatever choice of high abstraction language (Python, Ruby, Haskell...) you prefer. And where those pros matter (to stay with the speed example, optimization), you're most likely better of using C or Assembly.

The only real use for C++ I still see is high performance gaming. And I hope that dies out in favor of real games.

Re: Hacker Poll: Is C++ the Language of the Future?

#58
post #29

James notes the uncertainty surrounding Java following Oracle's acquisition of Sun, and the uncertainty around .NET as Microsoft seems to be de-prioritizing it in Windows 8. I can't imagine Java and .NET developers moving to C++ much less enterprises changing course.

Yes the assertion in the linked article that MS is replacing C# with something called "WinC++" is frankly, bizarre, and calls the author's credibility starkly into question.

Re: Hacker Poll: Is C++ the Language of the Future?

#59
I've been using C++ almost exclusively for over a decade. C++ is wonderful, powerful, ugly, and dangerous. It's entirely dependent upon the developer, and it varies with popular trends. Just when you master something like Boost, you move to a new company where you aren't allowed to use it. Everyone preaches his own religion of whitespace, best practices, and patterns.

Lately, I've found the ugliness inescapable and deeply irritating:

    for (std::vector::const_iterator i = myinst.begin() ...
The repurposing of the 'auto' keyword in C++0x can greatly reduce this ugliness:

    for (auto i = myinst.begin() ...
But, of course, people will abuse auto and have "auto n = 5;" (a 'foreach' makes this even cleaner, but the above syntax exemplifies other situations as well)

I've recently been doing a bit of C# coding again. I'm stunned at how quickly I get get stuff working, mostly because .Net contains all the boilerplate I would either write myself, or have to track down in 3rd party libraries. I wrote a page scraping tool the other day in C#, on my Mac, in vim, with the Mono C# compiler. I had it done in under an hour, and it runs on both platforms I use. My productivity increased by about 8x (clearly not universally applicable), and my enjoyment increased even more.

So, no, C++ probably isn't the future. The future probably looks like Python and Javascript on the web, C# in business applications, and plain C at the bottom.

Re: Hacker Poll: Is C++ the Language of the Future?

#60
post #8

Earlier quoted context omitted.

There are superior languages out there that do a better job Your statement is false, because the choice of language depends on the job. For example, when I need to make something simple quickly I will do it in C#. However when I need to write an add-on to an existing application that doesn't have an official plugin system, then C++ and Assembly are really awesome.

It seems you missed his qualifier: "for building complicated software that is robust, easy to use, easy to maintain, fast and scalable" Complicated + robust + easy to maintain is plain impossible in C++. Also, add-ons fit "enhance software" better than "building software".

Complicated + robust + easy to maintain is plain impossible in C++. I don't think so.

Also, add-ons fit "enhance software" better than "building software". Your "building software" could also be labeled as enhancing the operating system.

Post reply on HN