What is better than C++? Otherwise I'm going to keep using C++ because it just works, it's faster/better...

What is better than C++? Otherwise I'm going to keep using C++ because it just works, it's faster/better, and when C++17 comes it will be ten times better than Rust. C++ is already better than "lol scripting, developer productivity, dyanmic" meme languages so don't suggest those.

Other urls found in this thread:

cplusplus.com/whenever
archive.org/details/2014ProgrammingPrinciplesAndPracticeUsingCPlusPlus
edisciplinas.usp.br/mod/resource/view.php?id=1009587
twitter.com/SFWRedditVideos

No languages are all around better than C++. Nothing even comes close.

C#

I found Free Pascal/Lazarus far better for crossplatform. The unit stuff is more organized than header files.

But for serious stuff, C++ is necessary.

C

>when C++17 comes it will be ten times better than Rust
Did you forget to update your copypasta? It's already here.

>lol developer productivity
t. NEET

Stop posting, Bjarne.

I feel for this meme once. It was around the time I was having to manually allocate and deallocate variable length and perform vector operations with add(a, b) instead of proper operator overloads that I realized I'd been had.

is there anything in 17 that is relevant to developers?

That's part of the fun for me I guess, I get off on writing socket traffic though

Structured bindings are a really nice simplification of a couple situations involving tuples and iterators. std::variant, std::any and std::optional are all nice too, nothing that couldn't be done with a custom class before, but now you have a standard form for it that other C++ developers can be expected to understand.

Think they added some new stuff for variadic templates but I haven't looked into that, never used variadic stuff much anyway.

compile-time static if with the form if constexpr(expression)

UTF-8 character literals

Nested namespace definitions, e.g., namespace X::Y { … } instead of namespace X { namespace Y { … }}

Template deduction of constructors, allowing std::pair(5.0, false) instead of std::pair(5.0, false)


std::string_view, a read-only non-owning reference to a character sequence or string-slice

New insertion functions try_emplace and insert_or_assign for std::map and std::unordered_map

A file system library based on boost::filesystem
^^^ probably the most useful change ^^^

Parallel versions of STL algorithms

std::byte

Logical operator traits: std::conjunction, std::disjunction and std::negation

Lemme give you guys some advice, from sepples fanboy to sepples fanboy:

If you want to help ensure that C++ survives while Rust dies the same slow death that D is undergoing, program in C++.

If your employer is using C++, continue using C++. When contributing to open source projects, use C++. If a project is using D or Rust, suggest switching to C++ (this has worked in the past -- see OpenMW). If someone suggests not using C++, use C++ anyway. Alternatively: sell them on updating the codebase to a more modern version of C++.

If a project you're working on is using C, throw a healthy layer of C++ on top of it. Or, just keep using C. Anything to keep the shitters out.

This will only become easier over time. C and C++ are so mired in the industry that fully displacing them would take a herculean effort. And I'm not even talking about legacy systems like the ones still supporting Pascal. Just look at Fortran -- 60+ years strong and going. I think C and C++ can surpass even that.

Don't worry, I'm working on it.

...

really? why?

The less compatible Java. Real garbage

>namespace X::Y
oh shit.
People should not throw on a ton of namespaces.
>file system
finally

Are there any books that teach modern c++? Like c++14 and soon C++17?

Why do you think you need more than the documentation?

Every other major language is useless in some area.

Many modern languages simply can't run fast enough for high performance applications.
Even when they can, the garbage collectors can pose a problem for real time applications.
A great number of them can't take advantage of multi-core hardware.
Although things are improving for other languages, C++ still holds the remarkable honor of running on all mobile and desktop operating systems, the web and a significant chunk of embedded devices.
C is simply too obtuse for rapid development of large scale applications.

And then we have C++. The fastest thing around, easy to use, interoperable with C out of the box, runs on damn near anything, you can even plug in a garbage collector if you feel like it.

There are certainly situations where using other languages is better, as much as I like C++ I don't use it for everything. But there is no other language that can be used to club every single problem you will ever encounter to death if you so choose.

I like hand holding.

C++ is NOT faster

C++ that's fast looks suspiciously like C

Not OP but the C++ documentation is the worst documentation of all programming languages.

It's not fully standard yet, you stupid retarded nigger. Go back to rebbit, small brain.

Strostrup's "Programming Principles and Practice using C++" uses C++14 in the latest edition.

However, if you already know C++ 11, it isn't difficult to get up-to-date by reading the documentation.

I do better with books just personally
It's easier for me to find what I'm looking for and understand what i need to do

I only know the very basics.

Nothing, unfortunately. C++ is a hideous, overengineered, directionless and mangled piece of shit.
It's also unrivaled in its power, and it's sad that nothing has yet replaced C++. D had a chance but then had to go full retard with its GC.

Read the book I mentioned along with articles on cplusplus.com/whenever you need more clarification.

Here's the book btw archive.org/details/2014ProgrammingPrinciplesAndPracticeUsingCPlusPlus

>C++ that's fast looks suspiciously like C
It also has templates and lambdas, which can be better optimized than void* and function pointers.
Faster code can be written in C++ than is possible in C.

First of all, as long as you avoid doing stupid things like abusing shared pointers/virtual functions and not passing by const ref, you're basically going to produce the same assembly that would come out of C.

But more importantly, who cares? The language lets you choose between writing the fastest code available and having an easier time writing it. That's still better than not giving you the choice at all. (And I'd rather write C-style code in a language with modern features any day over using the real thing).

RICHARD STALLMAN

The big problem with C++ is that it's so big and difficult to learn. The majority of C++ programmers only know how to write C++ one way and will stick to it dogmatically, so the choice that you speak of does not exist for them.

That I'll give you. I encounter people who have programmed in C++ and say they "know" it all the time. I almost never encounter people who actually know all of the paradigms the language makes available to them.

trips+dubs of truth

wrong you can write the fastest possible code in c
get a load of this
UINT8 buf[] = { 0x33, 0xc0, 0xc3 };
typedef void(*wew)();
int main()
{
wew w = (wew) VirtualAlloc(0, sizeof(buf), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
memcpy(w, buf, sizeof(buf));
w();
}


name 1 code faster than that
unbelievable speed

What part of this doesn't compile as C++?

...Does this actually work?

U N D E N I A B L E S P E E D
of course, it's x86 though

No, it only works on 1 toy operation systems for children
>VirtualAlloc

Is there a Linux equivalent?

winapi > whatever meme shit linux has, and thats a fact
on linux you could probs just alloca the byte buffer and execute it from the stack, does linux even have NX?

The real garbage here is JVM.
Java is dying of because of Oracle

cool, so now preprocessors may be 3x times slower

What's so bad about JVM?

yeah, mmap
here's another fun meme for you

int main()
{
return __rdtsc() % 255;
}

absolutely the world's fastest psuedo-rng

>of course, it's x86 though

And Windows only.

__rdtsc is an intrinsic, it's 1 to 1 with the cpu instruction, rdtsc, which exists on x86 and x86-64
the original byte buffer was only x86 because i was too lazy to look up the bytes in an x86-64 process
i'd hope that linux can use it

is this a joke?
>compile-time static if with the form if constexpr(expression)
rust already has this
>UTF-8 character literals
rust already has this
>Nested namespace definitions, e.g., namespace X::Y { … } instead of namespace X { namespace Y { … }}
rust already has this
>Template deduction of constructors, allowing std::pair(5.0, false) instead of std::pair(5.0, false)
rust already has this
>std::string_view, a read-only non-owning reference to a character sequence or string-slice
this is just a blatant copy of &str, so of course rust already has this
>New insertion functions try_emplace and insert_or_assign for std::map and std::unordered_map
rust already has this...
>std::byte
rust already has this

they are really grasping at straws copying features they're still lacking after decades that rust (a brand new language) has already had working since the start by default.

I mean, just look at Rust is better than C++ for a hell of a lot of applications (obviously not everything since C++ is much bigger) but people refuse to use it for political reasons.

Use the best tool for the job.

bumping so all you idiots see this

Ada
dont even try and dispute this, it is literally impossible

you're not going to trick people into using shitty language of the month #300

>rust is a shitty language of the month
>*covers ears and closes eyes* blaa bla bla it doesn't matter that one of the biggest players in the software industry is pouring tons of time and money into it and using it in one of the most uses piece of software in the world waaaaa

baka

barely anyone uses firefox anymore lol

>mozilla
>biggest players
who cares lmao
it's just like go, who ha(s/d) another big company behind it
but it's useless

not even Google is using Go for anything relevant.
Servo is the future of web browsing.

depends on what you are doing

language selection is just about picking the right tool for the job

The best:

C

Perfectly acceptable:

C++ avoiding all the fucking stupid convoluted OO bullshit whenever possible

>BUT MAH INSECURE HORRIBLE BAWWW POINTERS NO STRINGS C
Learn to code, noob.

Common Lisp. You get scripting, compiling, interactive, dynamic, typed, objects, metaobjects, macros and procedural and functional programming all in one package.

isn't meyer's effective series the go to
edisciplinas.usp.br/mod/resource/view.php?id=1009587

too bad the syntax is dogshit
Ruby + Crystal is what you meant.

>PAGE_EXECUTE_READWRITE
what could possibly go wrong
this is why everyone hates ctards

because you can choose the page permissions?
you do know that you need page permissions to execute code regardless of language, right?

setting a writable executable page is just asking for an arbitrary code execution exploit

> mozilla one of the biggest players in the software industry
ha ha ha.
ha ha
ha

are people really this myopic?

embed lisp in C++ and you can do interactive C++

D is better than C++ --top to bottom.
C was created by Electronic Engineers
D was created by Compiler Engineers
C++ was created by a literal uneducated faggot because C was too hard for him

And D creators are the people who first implemented C++ because Bjarne is not a smart programmer himself. D creators knew, from the very beginning, what's wrong with C++

>hurr if I use words I learned in grade 5 people will think my opinion is worth more than everyone else's

grow up shitlord. mozilla is a major player in the software industry whether you like it or not.

did you freak out on the word "myopic" ? are you american, for the record ?

sure, just keep living in your hn/reddit bubble.

What's so fucking hard about
(function arg arg ... arg)
really?
Think of it as more flexible dot notation.

Why only c++14 and 17? What about 15 and 16?