I think C++ created this ethos where people view computers as this mystical thing and "bugs" just a part of computers. You have a language so big and so complicated that's such an infinite rabbithole of inconsistencies that fall on a wide spectrum of fuckup that it's profound to stop and evaluate that you can boil it down to a fine science where nothing will ever go wrong
You think Windows wouldn't be the legendary shitstain that it is if it were made with something else? Even pure C?
Jason Hernandez
Just because you're bad at using it doesn't mean it's shit, dumbass
Owen Lewis
1. It's bad under circumstances no matter what you're trying to accomplish. There's literally no situation you would want a memory error
2. It's bad in ways that contradicts itself. Like uh, undefined behavior
That's the most of a rebuttal I can make to your utterly useless post. Which still manages to shoot C++ in the foot, because there's no way you can talk about that language without describing why it's shit.
Landon Davis
>There's literally no situation you would want a memory error
Shows how much you know.
Brayden Miller
The best we can hope for is something like Nim that compiles down to a non-retarded subset of C/C++ and still benefit from those compilers.
Nathaniel Wilson
It's a memory *error*, you fucking brainless troglodyte. It's erroneous
The only thing memory is is a placeholder for something else. Memory itself does nothing. If the only thing a bucket is supposed to do is carry something then you literally never want a broken bucket
But if it's so obvious why this basic understanding of how computers work is untrue then you should be able to form some kind of rebuttal. Go ahead, I'll wait. Educate me and everyone else that enters this thread on why memory errors are sometimes a good thing and why you are not a brainless cretin with an abhorrent lack of appreciation for technology that also happens to advocate for C++
Anthony Hall
Stop this slander this instant! If it weren't for muh backward compatibility, and therefore C, 99.9999% of these bugs wouldn't exist. It follows that the problem is with C. not to mention that there are more problems with C programs than C++ programs even on average.
Asher Ramirez
>because of C++ Only poor craftsman blames his tools
Evan Rivera
>There's literally no situation you would want a memory error
If you don't want memory error, don't write them, C++ doesn't make memory errors, you do.
Jacob Ramirez
Nim is clinically retarded though. At least chicken is nice (and compiles to C), but compiling to C/C++ is never a good option since it's one less layer of possible optimizations as well as one more layers where things can go wrong. It's also usually easier to examine an intermediary language tailored for the language (or, say, llvmir) than it is to examine C/C++ autogenerated output. Ultimately there are two useful paradigms (and hybridisations of course): rust-like safety or GC. GC is not viable for many workloads, but make programming very simple. Rust-like safety is very inconvenient because it becomes verbose quickly and many valid programs are rejected by the safety checker since it's very complicated to write a good one. As such it makes programming a lot more complicated. Maybe a full-fledged linear+dependent type system in a lisp-like language (due to properties like homoiconicity, hygienic macros and live image modifications) would be optimal, but nobody's working on something like that.
Andrew Diaz
C++ even provides you tools to prevent memory and other resource errors
Lucas Johnson
>not to mention that there are more problems with C programs than C++ programs even on average. I don't think there are literally any pitfalls in C
It's a tiny language and it doesn't obligate you to write it any way.
It's what NASA uses and they have literally no bugs so I'll take their word for it.
Maybe someone can correct me on this.
Evan Barnes
This is the worst saying ever invented desu senpai. Only a poor craftsman will try to dig a grave with a toothpick, because any decent craftsman will know that this effort is futile in expectation, and also not worth the time no matter what.
Isaiah Ward
>I don't think there are literally any pitfalls in C Cinbreds everybody. Didn't even bother reading further.
Andrew Moore
Yeah that's a great suggestion. The people that caused the false missile beacon in Hawaii "Just shouldn't have pushed the wrong button" too
The point is that it's a bad thing because there is literally no advantage
And it isn't that easy. Working with a large codebase and never having this happen is miraculous
Kevin White
Surely one of you will get around to making an argument eventually.
Jace Davis
>It's what NASA uses They are using C--
Oliver Reyes
If you literally define "error" as erroneous access of memory then yeah, you're right. It's by definition erroneous.
But your initial statement was way too absolute, that's why I replied. If you define "error" as memory access/write memory violation, then it's very much possible that you'd want it to be caused.
Many emulators, for example, use it to avoid bounds-checking (or other forms of explicit checking) on guest memory accesses, among other things. They hook their custom memory exception handlers (usually OS specific) and when an out-of-bounds read happens, they do whatever they have to, like invalidate code/objects/whatever.
I could provide examples of well known console emulators that do it but it may reveal my identity.
Colton Gonzalez
>but it may reveal my identity I know it's you, Brian.
Josiah Cook
no it doesn't, those are separate tools
Colton Baker
>standard library is a separate thing
Hunter Adams
You're talking about interacting with memory. Not the memory being used by the program you're writing
There is no reason the memory for a program should ever point to something that doesn't exist or balloon infinitely. These are inherently bad scenarios because regardless of what's on the canvas, the canvas is ripped
>testing things That doesn't count because that isn't the program you're trying to write. You're doing a crash-test for a car.
Christian Morgan
Fair enough.
Juan Bailey
There's always ATS which has Dependent Types and Linear Types plus GC when not using linear types making it easier to write code which doesn't require tracking every resource. Plus it's performance when using unboxed types is on par with c++ while being much simpler and expressive past that of C languages.
Justin Miller
alright sorry for calling you a brainless troglodyte but C++retins blow my lid when they try to snidely tell me that memory ***errors*** are sometimes a good thing and that if I think they aren't I'm just 2 stoopid to understand it
Colton White
Three main problems: -Absolute trash syntax -Grand total of 3 users worldwide -Compiles to C It's a great idea if you want ot use it to prove C programs, but it's not useful for much else and probably never will be (because the dev doesn't really have much interest in that regard). But you're right that the basic concepts of ATS and many aspects of its implementation are really good.
Dominic Bell
Nice try.
Just saw an absolute statement that seemed wrong without realizing what the point of the OP was, it was irrelevant sorry.
I agree that C++ is big and complicated and that we should have something better at this point as the norm. Rust is very promising as a replacement, but obviously this sort of thing that takes a _long_ time, C++ is here to stay for a few more decades at least.
3 worldwide users aside, I wouldn't want to write ATS just because of the syntax.
Jacob Richardson
Ah yes... its obviously the languages fault, not the dipshits programming in it who didn't learn how to program safely. The whole problem is c++ allows you to do things with memory that really do have a purpose but for whatever reason, no one learnt how to use them properly.
also inb4 "there are so many "unsafe" functions in c++", bare in mind all languages have problems and considering the scope of a lot of languages you are nieve to think differently.
tl;dr Programmers are the problem, not the language
Jeremiah Ortiz
it'll be around but c++ reputation has suffered greatly, it went from need to know to everyone trying to replace it in about a decade
Liam Wilson
Other languages have set out to do what Rust have done but they didn't make it. Turns out no one gives a fuck
Grayson Barnes
>he doesn't know hot to implement copy constructors in a class with pointers as data members How is freshman year user?
Liam Moore
>2018 >not implementing a COW copy constructor
Liam Ramirez
>declaring multiple equivalent instances without modifying them.
Joshua Green
You want a broken bucket if you need a funnel and it's impractical to go get one
Evan Phillips
...
Samuel King
Kek'd
Caleb Rivera
> "literally" no bugs > space shuttle carrying a teacher explodes
Carson Gutierrez
How can memory errors be real, like nigga just pass valgrind on it lmao.
Brandon Rivera
Kids always amaze me.
Andrew Turner
Why is hair a cRUSTacean?
Samuel Howard
>promote diversity >chad side of the meme
Please for the love of good kys or at least never have children. You truly are one of these human beings which could make this world better only by removing themselves entirely from it.