What is the general opinion of C++ on Holla Forums?

What is the general opinion of C++ on Holla Forums?

Is there any better language for vidya development and intensive application creation?

Is it to hard?

Other urls found in this thread:

en.wikipedia.org/wiki/C++
harmful.cat-v.org/software/c /
harmful.cat-v.org/software/OO_programming/
codeproject.com/Articles/26517/NET-Internals-and-Native-Compiling
github.com/fancycode/MemoryModule
github.com/google/googletest
opencv.org/
twitter.com/AnonBabble

Too big. C with classes would have been fine (maybe keep templates).

C/platform specific ASM for games. Anything else is shit.

So it's good for Unreal and shit for everything else?

learning C++ will take you way more time than learning any other language

a C++ programmer said that a ballpark estimative of the time it takes to master c++ is 10 years.
Take it as you will.

The lowest level language that you can use to create non systems applications

C++ is great for consumer applications and with the right IDE and coding style it's not unpleasant. I program C++ for my job, for server side code, thought there are many alternatives for server code.

I just don't see how you could write something like a browser, a word processor, or a AAA game in something other than C++. Large parts of Windows are written in C++ too.

C doesn't let you create the right abstractions. Java has stop the world gc (does it still? maybe it's got better). Everything else either is too slow, or lacks the libraries and mature toolchain.

It's great if you ignore the 99% of it that is shit and use it as C with RAII and unwinding. Portable to every platform you'd want to target, high performance, low memory, low latency, can build reusable libraries for almost every other language. The only negative is that security/isolation is poor.

There's nothing stopping you from using C++ like it's C with classes+templates, you know.

C++ is a good general purpose language. It'll take you about 10 years to become truly an expert but this is true with everything.

Unless you're focusing on embedded it's better to go with C++ for the abstractions and godly libraries.

All who hate on C++ are cucks jealous they ain't gotgud. You should be programming.

[citation needed]

here you go en.wikipedia.org/wiki/C++

Literally any language with good library support. A layout engine on the other hand like Servo has more limited options, but that one is being made in Rust.
Literally any language
Yeah THIS is the main thing I think you have no other choice other than C++, at least for the core stuff like the engine.

C++ needs monads.

You mom got mo nads last night ;^)

More like MEMEnads

I never learned C++, do you think that's a problem? I've been programming for like 15 years (Java, Python, R, shit like that), is it worth going back and learning it now?

so big and full of features it hurts, but best we have for now, unless you want to go full C

anyone making games and resource intensive applications in Java should just kill themself now, to save killing themself later

yes
you are programming crap

The problem with C++ is that code often has non-obvious side-effects, but since it is a de-facto standard, those non-obvious side-effects have established techniques to avoid them. i.e. like using the rule of five

So if that bothers you, stick with C.

Almost any other. You are not going to need the performance for your little game, and even if you do, a combination of FFI and C will do you better.

This phrase doesn't even have a meaning.


Please don't give the committee ideas, you know they'd do it.

D is better.

So I was thinking of starting to learn programming with c++, although the replies in this thread make it sound like a language that isnt really for beginners. What would be a better starting language? Python? Java?

You can learn to program from pretty much anything.
If you want to learn the old fashioned way try BASIC, but I don't know of any good, modern BASIC interpreters. Either find or emulate an old ZX Spectrum/Amiga 500 or find a copy of QBASIC. I'm sure there are better options for BASIC though.
Alternatively Python works great. Just remember that using indents instead of brackets is a Python thing, and you won't see it much outside Python. If you're finding Python annoying take a look at Perl 5; They're similar in purpose but have some major design differences.
If you want some Holla Forums memery get a copy of SICP and learn MIT Scheme, or get Realm of Racket and learn Racket. They're both Lisp, and they're very easy. If you're having issues with Racket or Scheme then try Hugs AKA Haskell 98. New Haskell has some hard to understand concepts, but Hugs is great for learning functional programming.

Whatever you choose look up good programming standards. Don't be the "New Averaging System" guy.

I like it, but you really have to know what you're doing to get anything good from it. It has a lot of features with tradeoffs that are non-intuitive from a high-level perspective, and if you're not careful you'll end up with a pile of spaghetti that no one wants to touch. It's not at all a good language for beginners imo.

But, if you know what you want to do, and have a clear mental picture of how you want to implement it, it's a great language.


Python's the standard starter language. It's easy to get working, has a decent REPL, a lot of already answered questions on SO, a library for anything you could want to do, and stays relevant and useful as you become a better programmer.

Holla Forums hates it because it has actual applications and that's just no good, it has to be some obscure meme nobody cares about.

C

C++ is great for the most part.
The good
>Superset of C, you can write pure C code in it with minor exceptions

It has a few downsides, imo they are not worth shitting the bed over


>some people think no garbage collection is a bad thing

I use it every day and get just about anything done in it. The main problem I have is needing to use libraries to communicate with projects developed by the other software teams, such as Redis, message queues, etc., but the C++ libs get less attention than their .net equivalent and are usually buggy/not threadsafe/unmaintained

It's not a hard language to learn, but you'll spend a few good years before you've really mastered it.

Are you faggots dense?

C++ is fucking ezpz

Assembly is the only hard language

if you want a really good road, do this

>go to C and learn all about pointers look into asm to understand inner workings better

the first two parts can be done in a week if you are not retarded, the last part will never end since there is always something new in C++, but be sure to learn MODERN C++ like C11 and later

now the "I am fucking retarded that will never make a good code" way

C++ is what happens when you take C and then try to bolt on every feature you come across in a CS book library.

We would need some new language that is C++ under the hood but throws out any semblance with C and trying to be a superset of it.

C++ is not a superset of C, not everything written in C can be compiled as C++.

C11 is on a good path for abstractions, now we just need a better standard library which does not use fucking null-terminated strings.

That's why it says "with minor exceptions".

Heh, I'm okay with this. But UTF8 should be the default, not ASCII.

Null-terminated strings are fine. They're more flexible and efficient than length/buffer strings. You'll find them heavily used in C++ code despite a standard library with support for the length/buffer form.

That would be both incredibly slow and stupid. Consider that low level languages aren't right for you.

Too bad nobody uses C11.
Like for instance, i've literally never seen a single piece of production code that uses the standard threads for instance. It's always either C++11 or C with pthreads.

C11 is very common but pthreads is still superior in both modern C and C++ for threading. They fucked up. Just be happy with thread_local and ignore the rest until they get their shit together.

harmful.cat-v.org/software/c /
harmful.cat-v.org/software/OO_programming/
What does Holla Forums have to reply to these?

They're just smarmy quotes. Enough room to show someone's opinion, but not enough room to properly argue for it. You can do better.

There is no "superset with minor exceptions", just like there is no "compatible with minor exceptions". Either it's a superset or not. Either it's compatible or not.

The same thing i would to the people dissing javascript for syntax quirks.
Quit posing and actually write some code.

Sepples has more quirks than anything else around but if you want to build nontrivial shit that needs performance AND abstraction like a game engine or an interpreter/compiler or hell even just a web server, in those cases, C++ is King.

C has the speed but it lacks facilities for abstraction, sure you can use libs but the STL nowadays has state of the art implementations of everything a programmer generally needs, from efficient datastructures to threading and file system interfaces.
I'm not going to dis C however, C11 is a move in the right direction, and naked C is still imho better for certain situations, like embedded or kernel programming, when you need none of the safety and all of the speed.

Oh and the final nail in the coffin of your quotes is that no sane person does classic OOP in C++.
Most of the modern code i've seen is "data oriented" which is a nice way of saying that you use standard containers as much as possible and don't craft Lovecraftian horrors of OOP because you have enough metaprogramming at your disposal to pretty much do anything at compile time and yet you can still use the power of Objects when necessary and appropriate.

C++ is not perfect, but it's good because it does everything and it does it faster than everyone else.

Best C++ books in current year?

Pic relateds are awesome.

Writing C++ with this, metaprogramming, and defensive typing in the current standard is actually pretty comfy. There is a much better language struggling to come out there.

Out of those I would recommend python but you can start with anything it doesn't have much of a bearing on what kind of a programmer you will be. I think its best to learn something you can make a little project with. That keeps you going. If there are any libraries for any language that interest you go with that. Want to make cool graphs? Python with matplotlib will get you learning. Want to make cute little games? Lua with löve can start you down that track. Want to learn lower level workings of programming? Assembly, C and, C++ are good. Just find something to do and learn regardless of the language's quirks. That is how you figure out what you like and a good language from bad.

You're right, it's called C

C with the STL as its standard library would be awesome, but by then it'd just be C++11 I guess.

use C instead

How do you even write proper tests in C++?

In Java I can write a interface Foo and the implementation as FooImpl, this allows me to write unit and system test easy since I can create a mock object without a problem.

In C++, you can go through countless of repositories and you will notice that they never test their code. Because nobody want to do dependency injection in C++ because that usually means you have to introduce a shared_ptr or unique_ptr. Futhermore, you will have performance-junkies getting a heart attack with all those functions declared as virtual in order to create a psuedo-interface. Even if you do, it is a pain in the fucking ass to write mock objects. It is also a pain in the ass to deal with shared_ptr and unique_ptr, I rather deal with raw pointers.

For me, everything in C++ seems like an afterthought and every new standard that the fucktard Bjarne introduces he never mentions this, nor does anybody else.

Using this I can load and run C# exe from native c++ application. codeproject.com/Articles/26517/NET-Internals-and-Native-Compiling

Is there a way to embed the managed assembly and run it from memory? LoadLibrary takes filepath but memory only has pointer to file. I tried github.com/fancycode/MemoryModule but it failed to work (LoadLibrary returned null inside MemoryModule's IAT fixing function).

OPINION

DISCARDED!!!!!!!!!

You handpicked that sentence of my entire post? Well enjoy writing shitty move operators and more then and ignore the real problem. I do not really expect anything from C++ programmers today anyway, they are just kids running after some muh game dev language hype train. No wonder most games are buggy as fuck today.

github.com/google/googletest
Which is used by LLVM, Chromium and a shitton of popular C++ projects.
You just don't know shit about the ecosystem because you don't write in that language, stop talking out of your ass.

Also wait for fucking C++20 if you can't deal with the lack of interface or traits, concepts are almost ready and contracts are awaiting TS iirc.

You need to RTFM before you ridiculise yourself and ruin the few good points in your post.
raw pointers are for reference.
unique_ptrs are for ownership.
shared_ptrs are for reference counted shared ownership.
It's not that hard.

enjoy your memory leaks and buffer overflows grandpa

Babbies first troll? I think you are the grandpa here, I moved on to functional languages. But enjoy your mess that Bjarne shit out.

>github.com/google/googletest
I already use that in my project, you obviously did not even comprehend my question.

No, you don't know shit since you refuse to even accept that it is a problem in C++. Linking ONE project, a single fucking project then follow up "a shitton of popular C++ projects" = You can't name a single more you useless tool.

Of course I understand this basic concept and I understand why they push for this. But that does not change the fact that they are a pain TO USE, as another after thought like the rest of that broken language you fucking asshole.

it's pretty good

that's all

What I understood is that you're incapable of writing meaningful tests without mocks or dependency injection because you're a Java codemonkey that hasn't read the literature on the subject. I just tried to give you the benefit of the doubt.

How? unique_ptr has no performance overhead and there is syntactic sugar all over the place, hell with auto and make_unique what else do you want?

opencv.org/
Stay wrong.

Basic arithmetic is not your strong suit user.
At least try to get a hold of your emotions.

If you can't see the benefits of sepples versus funlangs for certain problems you just suck at programming (and probably computer science as well).

Call me when you can do real time rendering solely in Haskell.

FWIW, I think unit testing is a huge waste of time since it's insufficient on its own and entirely overlaps other classes of test. I test my C++ projects with functional tests which much better simulate with far less effort what they'll have to deal with in reality and these tests can run on the realeasable executable rather than some mocked up mess. The drawback is such tests are harder to write, require complex test environments, can take longer to analyze a failing test, and are slower to run.

The problem here is that you want your tests to both give instant feedback and do meaningful error detection (and not be useless boilerplate for coverage bragging rights). It's yet another tradeoff.

Good C++ code is not really object oriented anyway, so it's no use trying to do object level unit testing. Just take a few steps back and try to identify implicit modules (or maybe make them explicit if you don't need the coupling for other reasons) and test those.

Writing good tests is usually as hard as writing good code, and people already have a hard time doing the latter. Shit's non trivial and as usual in computer science there's no one size fits all solution.