So have they made C++ into Java yet?

So have they made C++ into Java yet?

Other urls found in this thread:

nestedvm.ibex.org/
twitter.com/NSFWRedditGif

I feel like C++ has lost its niche in these times.
It was built as an improvement over C, and while the OOP model by Stroustrup is solid and timeless, the language itself doesn't really have a place of its own now.

C is used for systems programming, and high level languages like Java are used for server-client stuff and other desktop apps. C++ occupies a weird place between the two.

I work in the defence industry and while most systems are an amalgam of C++, Ada and other languages C++ have a huge market share here. It's fast, platform independent, oop, can interface with kind of everything and while c++ programmers are very conservative the new smart pointers and C++11 kind of fix most issues with C++. We will still have to live with the evil implicit type casting though.

c++ is also not going anywhere in finance. furthermore, i haven't heard any fundamental criticisms of c++11/14 from any peers. generally, it enables smart and intuitive code security for no overhead. i've never seen more excitement about a programming language than i have for c++11/14 in the past couple years. for people that are using c++ actively in their work, c++11/14 has been a ridiculous success

Why would you chose c++11 over Java?

When I want to allocate things on the stack.

Comparing Java to C++ is the dumbest fucking meme

>OOP model by Stroustrup is solid
>multiple inheritance is solid
See, that's how I can tell you ain't never worked a day in your life, unless it was a burger-flipping job.

>allocating anything on the stack in 2016

Well, it wasn't perfect, but it is the foundation to OO models of other languages.

And besides, Java has multiple inheritance too. You can implement multiple interfaces. It's a small fix applied to a grand model.

>15 years ago
>C++: lol, so complex. So hardcore.
>Java: wow, Java is so easy and simple. I love it.

>Now
>C++: wow, c++ is so easy and simple. I love it.
>Java: wow, Java is so easy and simple. I love it.
Really makes you think.

Operator overloading is handy sometimes

>yfw you find out about template

I like it, but I hope it is replaced by Rust.

The downsides of multiple inheritance are solved simply by not being a retard.

Meanwhile, how are you enjoying your AbstractFactoryFactoryFactory?

unwrap()!;

Isn't the JVM a stack machine?

Hi Pajeet.

>muh templates
they fucking suck, dear god, what a clusterfuck

This.
I don't know about this feature in other languages though.

>I suck at metaprogramming

U mad? I'm actually a C programmer and don't even like Java but at least I know what i'm talking about.

Could you at least try to answer the question?

Assembly > C

Everything else is trash

Instead of giving us the ability to define functions better, and give hints to compiler what to do, we have retards making the down at the metal language some retarded abstract shit that takes 2 lines of code instead of 1 line in C#/Java

/thread.

most of C++'s big mistakes are inherited from C, but not having auto-destructing smart pointers was maybe the biggest fuckup of the new language.
variadic templates and perfect forwarding for things like std::unique_ptr make doing the "right thing" so much easier now.

> exceptions are still a garbage abstraction that can never be retconned, but they're feasible to deal with properly and to largely avoid

100% this

if you're willing to buckle down and get on board with the new features and the c++ wavelength, it becomes challenging to do the _wrong_ thing.

the real beauty, though, lies in the idea that doing the right thing feels good. you don't sit there thinking you could have done things better or more efficiently. the features and style just fall into place remarkably well.

Yes nestedvm.ibex.org/

What's the point of C++ when I can use Java for OOP and C for systems programming.

Also
>multiple inheritance
Not even Java is that fucking stupid.

templated methods
lambdas
an actual keyword for nullptr to differentiate from 0
Less restrictive and more comfortable syntax
More modern libraries

Except you can literally do all those in Java.

also C has it's own keyword for a null pointer, you C++ degenerate, it's C++ that didn't have a keyword for a nullptr until 11

You can't do them in C though, which was my whole point

Just because there is a constant called NULL which is defined as 0, that does not constitute a keyword

literally all useless and introduced more bugs. Why would I need any of that, except for maybe lamdas, for Systems programming?

Stack allocation refers to the call stack, it has nothing to do with the internal design of the language runtime or how it executes instructions.

templated methods allow you to make your code more reusable without sacrificing efficiency (since this is a compile-time feature). That's important no matter what type of programming you are doing. Also, the fact that C lacks lambdas and has such unnecessarily strict syntax makes it feel very cumbersome and just unpleasant to work with. Additionally, the fact that a struct or class can contain methods in C++ is useful as it provides better organization of code within libraries, making them much more intuitive to work with. I started with C and eventually quit using it in favor of C++ because it requires less effort to accomplish the same end result.

To be fair though, "systems" programminig is a broad category. Care to be more specific?

An expanded type system that catches errors at compile time only reduces bugs.

because you want to manage memory

>only reduces bugs

No, Multiple inheritance for one introduces a shit load of potential problems.

We weren't discussinig multiple inheritance. If you don't want to use it, then don't. I know I don't. Just because something is possible doesn't mean you are forced to do it.

You got me there, I was referring to the features in the list in the previous post.

>just don't use it
You know, that is not a valid argument when you are working on another person's code.
Some people are complete idiots who will use it.

Interesting enough, for as much of a shit language Java is, it's not that bad when handling inheritance in most cases.
Though their definition of protected is absolutely fucking stupid.

We will create artificial intelligent life way before we design a language that prevents idiots from writing bad code.

Girls get wet when you say you program in C++

girl here
can confirm

No they're solved by simply being removed from languages like they are now.

Being taught Java at the moment and our professor said it's just as fast as c++. He claimed the inbuilt memory management is far superior to and faster than doing it manually in c++. He basically thinks Java is the greatest language in existence.

Is he correct?

>He basically thinks Java is the greatest language in existence.
not really but it is superior to c++

Yes

Java is elite. The only reason why autists on g don't like it is because it's popular

java is an improvement over the old ways of doing c++ however with c++14 things are a lot better.

however java has other benefits like a built in and very mature UI framework (albeit kinda ugly).

personally i like working in java. the tools are excellent and it makes my life easier especially for debugging thanks to the jvm. c++ can still edge it in performance in places and that will probably always be the case however for about 98% of my work java is more than fast enough. spending 1000 man hours to optimise something in c++ more often than not is not worth it. i dont work in HFT or gamedev and such though, it probably matters there.