Now you will chose

Now you will chose.

Attached: c.png (194x100, 2K)

Other urls found in this thread:

stackoverflow.com/questions/381621/using-arrays-or-stdvectors-in-c-whats-the-performance-gap
twitter.com/SFWRedditImages

STL is garbage
there is no sane subset of sepples

>pears vs chairs

std::vector can take an allocator, so I can probably use both.

Incorrect. My use of C++ as C with namespaces and templates is absolutely fucking incredible.

One has RAII; one doesn't.
One is type safe; one isn't.
One automatically calls constructors and destructors as it allocates resources; one doesn't.
One is compatible with for-each loops; one isn't.
One has bound-checking; one doesn't.
One has speciation for arrays of booleans; one doesn't.
Both have roughly the same performance. You choose.

i am but a simple man
std:array

The last line is patently false.

I only use brk(&addr);

why would you use that over T myarray[N]?

The array type doesn't decay to pointer

basically see plus other convenience methods

STL of course because i am too lazy to write my own data structures

stackoverflow.com/questions/381621/using-arrays-or-stdvectors-in-c-whats-the-performance-gap
sure thing

>One has RAII; one doesn't.
OOP/class features are cancer.
>One is type safe; one isn't.
Neither are typesafe, use Rust, Ada or Haskell if you want type safety.
>One automatically calls constructors and destructors as it allocates resources; one doesn't.
Again, OOP/class features are cancer
>One is compatible with for-each loops; one isn't.
Bloat
>One has bound-checking; one doesn't.
C++ doesn't guarantee safe bounds, try again
>One has speciation for arrays of booleans; one doesn't.
Booleans are a retarded datatype, next
>Both have roughly the same performance. You choose.
OOP adds bloat and slows your shit down. If you want to make C++ fast you mostly just use the C subset

c++ STL is more optimized than whatever garbage data structures you think you can write for C.

>low effort bait post
>will still get replies

>Still gave the low quality bait post a reply

Why?

>Why?
signpost for the n00bs
OPs on a roll

This just use Python. They have fast code under the hood with better data structures than you could possibly write yourself. Plus it's a good easy front-end!

>Neither are typesafe, use Rust, Ada or Haskell if you want type safety.
This is just wrong. std::vector can be meaningfully type checked and void* can't, full stop.

>C++ doesn't guarantee safe bounds, try again
bounds checking is a feature of the std::vector type and its methods, not C++.

>bloat cancer retarded bloat bloat cancer
This is pretty much this same as declaring you have no rebuttal to what you're replying to and worse than not posting anything.

ALL POSTS WILL BE REPLIED TO, NO EXCEPTIONS.

wow, I knew your reply was gonna be retarded but you exceeded my expectations. Congrats!

>bounds checking is a feature of the std::vector type and its methods, not C++.

But mostly people use the [] operator with vector, which isn't bounds checked.

If your performance needs are satisfied by that and you're not that concerned with scaling out more nodes to service more and more requests, that's more than adequate recommendation.

You can start posting arguments whenever...

Attached: 751.jpg (598x792, 72K)

>NO EXCEPTIONS
speaking of which...muh zeo cost

The ultimate argument would be that the extra information you provide to the compiler through the semantics of types means it can make some specific types of optimizations. Even most c people are throwing all these gross __compiler__ directives to achieve effectively the same thing.

This does not make sense to me. I can't think of scenarios where you wouldn't be using 1 extreme or the other.
You either manage the memory in C or you say, perf doesn't matter and you're more focused on saftey, convenience, or whatever else and use a higher level language.

I legitimately can't see a reason to use C++ unless you had to.
If I'm going to be jumping back and forth between paradigms, using C++ for convenience and falling back to C for perf critical sections, I'd rather use Golang with Cgo than C++ with C.
But I don't do that anyway. I either write in C or I write in a higher level language. C++ allowing you to mix these things seems like a shim more than anything else, and restricting yourself to the ""slightly"" less performant methods makes it indistinguishable from other higher level languages at runtime, but worse to work with in syntax.

I don't get it. It feels like a crutch made to hurt you when you use it.

>OOP/class features are cancer.
Enjoy your memory leaks.

>Neither are typesafe, use Rust, Ada or Haskell if you want type safety.
C++ is perfectly type safe if you don't break everything on purpose.

>Again, OOP/class features are cancer
Enjoy your memory leaks.

>Bloat
Shortens code while keeping it readable. Not bloat.

>C++ doesn't guarantee safe bounds, try again
.at()

>Booleans are a retarded datatype, next
Opinion discarded.

>OOP adds bloat and slows your shit down. If you want to make C++ fast you mostly just use the C subset
Compile time and execution time are two different things. C++ absolutely wrecks the shit out of C on run time.

now this is LARP

Java doesn't have this problem