Attached: 77fd406cdf_300crop.jpg (300x200, 12K)
Why not both?
Chase Morales
Other urls found in this thread:
enyo.de
enyo.de
twitter.com
Juan Cox
C++20 deprecates all other languages
Cooper Smith
And Rust deprecates C++20. :^)
Nathaniel Cox
because rust is literally the opposite of C++ but rust programmers are too entitled and arrogant to see that. The freedom to shoot yourself on the foot is important.
There’s no reason to use rust if you can program C++ competently anyways, it’s for idiots who actually have problems with memory safety, who think rust is actually safe (it’s not, Ada is)
Landon Davis
You can still shoot yourself in the foot in Rust, you just need to shout 'unsafe' before you do :^)
Cameron Jackson
>be genius programmer
>decide to make something in C because Rust is for tranny cucks and incompetent retards heh
>open formal verification software because that's how you make reliable software NOT WITH TYPE SAFETY HUUUUUUUUH?
>take 4 months to make a fizzbuzz
>publish it online
>not on GitHub cause I'm a very special person
>password is 50-character random string stored in my brain cause password managers are NSA-powered Jewish trick for brainlets
>fail password 5 times
>go to graveyard where ROT-13-encoded password is buried just in case
>run ROT-13 in my head cause I'm a genius and electronic help is botnet to get my ADHGit password
>push code
>ff evening
>"Your shit is so stupid it keeps segfaulting if I input anything bigger than 127 cause you can't even specify your crap correctly omfg get a job you pathetic loser"
>reply
>"it's your fault for doing it in the first place holy shit you're such a terrible programmer you'll never be a NASA engineer like me hahaha"
>decide to get a ride
>*pshht* *crack* *sips*
>my beautiful 1950s Unixmotive
>no airbag, seatbelt, cruise control, headrest or reverse camera
>this is the car of competent drivers
>lockpick contact because that's how hackers do it
>get arrested by a bulky black cop
>"Sir you broke the speed limit, and your car lacks the most basic security devices. I'll get your information. Let's start with your e-mail."
>"[email protected]"
>"I'm sorry?"
>"uhh... [email protected]"
>"You know it's dangerous to ride in such a shitty car, right?"
>"a-at least I'm not a brainlet!!! how about being a competent driver instead of needing babby safety like a SJW tranny? it's not even that safe because seatbelts can break your collarbone!"
>"Sir get out of the vehicle. I'm taking you to the station where you'll get a mental health test and we'll decide where to send your fat ass after that."
Andrew Gutierrez
Ob.
Cooper Sullivan
Why not [peanut butter] and [a passionate refutation of peanut butter that also tastes like peanut butter]?
Justin Johnson
I don't know anything about Rust but I am willing to believe there are some cases where it will protect from problems you might typically run into with C++. Are these problems so frequent and debilitating to a project that Rust is more often than not the better tool even though far fewer programmers know how to use it? Does the industry really need another compiled language? If you have a halfway decent answer to why Rust is preferable to C++, I feel like you would be the kind of person that would know how to write C++ code and not make those mistakes. In my opinion C is the cumbersome, academic one you want people to learn because transitioning to anything higher level for real projects is smoother than the other way around.
Charles Clark
>unsafe {}
:^)
Caleb Morgan
>it’s not, Ada is)
Nice misinformation. Ada's type system is so shitty they had to come up with a subset of Ada lang itself called SPARK to avoid the hole in type system
Tyler Young
Because C++ is a man’s programming language and rust is for trannies.
Of course it deprecates it, much like a tranny deprecates his own cockles and ballocks
Evan Campbell
Do you realize there's a rust Vulkan/dx12/Metal api that isnt just bindings? (gfx-hal)
You're off your meds
Chase Martinez
>Ada
I'm always surprised I don't see more mention of Ada in these kinds of threads
Hunter Butler
>SPARK
what about Coq
William Bell
Academic masturbatory material
Leo Thompson
Ada has an excellent type system. plus high level language, excellent low level interfacing, compiled etc
Christopher Reed
enyo.de
Ada is utter garbage. No wonder it failed so miserably.
Carter Gutierrez
What does Coq have to do with Ada?
James Lopez
yep, skillful people wasting their time when they could be making c++ better. what a fucking waste
Hudson Scott
>Ada is utter garbage.
it's not. you probably never used it in your life
>No wonder it failed so miserably.
it didn't.
i think SPARK and Coq are roughly equivalent in what they can do... they [can] use the same proving engine
Chase Ward
Ada reminds me so much of VHDL
Christian Jenkins
how do you shoot yourself in the foot in C++?
t. non-programmer who's here for /csg/
Hudson Gutierrez
template meta programming
Leo Harris
Every language is absolute dog shit, the modern way to do things is like the Javascript environment. you build a Framework and make your software around it.
In that context languages are inflexible and always in the way, the language should provide an agile method of creating abstractions and disabling some others.
Every element of a language should be dynamic, if i want to disable classes i just disable them, same goes for for loops if statements.... the end result would be a language built around goto statements the ultimate chad program that only uses gotos.
Hudson Stewart
>No counter-argument whatsoever to the article
Like textbook. Ada shills on complete denial holy shit it's pathetic
By using type-unsafe legacy C constructs.
Gavin Hall
>hurr durr someone found a use case where Ada fails
>this means Ada is shit
>B-BTFO!!!11!!
kys retard
if you haven't used at least 5 years of Ada your opinion on the matter is irrelevant
Brayden Lee
>NOOOOOOO YOU CAN'T JUST CALL MY SHITLANG SHIT
Jayden Collins
If you want to fux wit your AST at runtime, use lisp
Connor Turner
>NOOOOOOO YOU CAN'T CALL ME OUT ON MY BULLSHIT EXCUSES
Jayden Nguyen
>ultimate chad program that only uses gotos
10 year old me had the right idea after all
Easton White
>NOOOOOOOO YOU CAN'T JUST CALL ME OUT ON MY MISINFORMATION ABOUT MY SHITLANG NOT BEING SHIT
Owen Sullivan
what
what
Wyatt Green
>WHAT DO YOU MEAN THIS PARTICULAR USE CASE IT'S NOT ENOUGH TO PROVE THE LANGUAGE IS SHIT
Josiah Reed
impartial judge here.
you have lost.
your pic was not an escalation.
Dylan Richardson
>JUST DON'T LOOK AT WHERE MY LANG FAILS FOLKS JUST LOOK AWAY PLS
Benjamin Hernandez
This new tranny copy-pasta is...
It's... IT'S...!
Absoulutely garbage. 0/10 TL;DR'd all three times I saw it today.
Charles Martin
>THAT amount of cope
It's working as intended
Gabriel Powell
Adrian Perez
because they fit the same niche, except C++ is an industry standard
rust's safety features are nice until you call into a C library like openssl
Levi Powell
>By using type-unsafe legacy C constructs.
Such as?
Mason Ortiz
>if you haven't used at least 5 years of Ada your opinion on the matter is irrelevant
Are you in embedded?
Cooper Young
Decaying arrays
void*
null pointer
Carter Martin
why :^)
Michael Roberts
>the intent was for you to read the first two lines, realize it was dumb shit that's been copy pasted by discord trannies to defend rust; and ultimately cause you to scroll past it.
I'm glad it worked discord tranny, I'm glad it worked.
Don't 4get 2 dilate
Carter Scott
I need a job, lel
Matthew Allen
no, i'm a glow in the dark nigger, why?
Bentley Adams
>Decaying arrays
How is it different from all the languages the only have reference types for arrays?
>void*
Very useful
>null pointer
What language doesn't have that?
Justin Collins
>I-Im glad it worked, thanks !!!
Austin Price
apply for job postings? you don't need Ada for 99% of the jobs and if you do you might need a security clearance :^)
Jackson Long
I applied for one programming FPGAs in C, gonna apply for some more. I'm a American citizen, for I imagine I should pass security clearance
Juan Jones
do you need +30 years to produce quality reliable code in rust like you do in C++?
Grayson Evans
*so I imagine
Oliver Martin
>I should pass security clearance
there are different levels of sec clearances
anyways, can you write kernel level C functions?
Nathan Lee
>no mechanism to prevent double free
#define SAFE_FREE(x) ((x) != NULL && (free((x)), (x) = NULL))
i think this works
Evan Clark
>open file
>read it
>check if free occurs 2 times in the string
>???
>profit
Gavin Thompson
Never tried
Joseph Young
Do you mean like writing kernel modules?
Cameron Sanders
No... B-but thats not the point!!!!!
Daniel Mitchell
>Invisible to the compiler, naive AST injection
What could possibly go wrong
>How is it different from all the languages the only have reference types for arrays?
They don't decay. C lacks actual array type, C++ has it: std::array
>>void* useful
Because C lacks proper polymorphism and relies on type unsafe runtime deduced form of polymorphism
>null pointer
>What language doesn't have that
Many
Angel Reed
>quality reliable code
>in C++
come on now
Xavier Lewis
koder detected
Eli Allen
>What could possibly go wrong
well, what could go wrong?
Easton Brooks
just dealing with real-time linux kernel calls
Nathan Adams
No I haven't done that, how would I learn about that? Good books?
Brody Clark
Null doesn't mean that it has been freed, it simply means an absence of a value.
Angel Williams
>well, what could go wrong?
SAFE_FREE(important_pointer++)
>Null doesn't mean that it has been freed, it simply means an absence of a value.
The point is that he sets it to NULL
Nolan Hill
just search the web. Again, this is very specific work and 99% of the jobs don't deal with this. probably just keep doing what you're doing and not wonder into uncharted waters
Zachary Hernandez
it makes no sense to free a null pointer, so you're free to use it to signal that the pointee has been freed
should help with crashing early in case someone tries to dereference it too
obviously you shouldn't rely on it to magically fix double free bugs that occur due to logic errors, but i think it can at least help mitigate the damage somewhat, especially on c libraries where double free can lead to code execution vulnerabilities
i don't think that's a realistic issue to be honest
Joseph Gomez
>i don't think that's a realistic issue to be honest
Still, how about doing this instead?
#define SAFE_FREE(x) (x)=my_free(x);
void *my_free(void *x)
{
if(x){free(x);}
return NULL;
}
Zachary James
Correction
#define SAFE_FREE(x) (x)=my_free(x)
void *my_free(void *x)
{
if(x){free(x);}
return NULL;
}
to swallow the semicolon
Charles James
Although I guess that SAFE_FREE(pointer++) would still be a problem because then if you passed pointer to SAFE_FREE again it would be non-null
Jaxson Lee
#define SAFE_FREE(x) my_free(&x)
void my_free(void **x)
{
if(((int)(*x))>1){free(*x);}
*x = NULL;
}
Well, if someone is dumb enough to call SAFE_FREE(pointer++) over and over, hopefully that will provide some protection.
Samuel Foster
#define SAFE_FREE(x) my_free(&(x))
void my_free(void **x)
{
if(((int)(*x))>1){free(*x);}
*x = NULL;
}
Lincoln Gomez
what are you retards going on about checking if the pointer is not null before freeing (and reassigning it)?
you do realize free(NULL) is noop, dictated by the standard.
the only issue would be double free, in which case:
1: setting the pointer to null after freeing doesn't prevent dereference through aliased pointers
2: it's adding overhead to your program because it's branching everytime you free
it's just a bad idea overall
Caleb Fisher
Because both a shit.
Brayden Smith
based. learn nim
Michael Bailey
>setting the pointer to null after freeing doesn't prevent dereference through aliased pointers
Can you give an example of what you mean?
Christian Diaz
I think I understand. You think we are trying to prevent free-ing a NULL pointer. That's not what we're trying to do.
Joshua Ortiz
using
's code:
[/code]
#define SAFE_FREE(x) (x)=my_free(x)
void *my_free(void *x)
{
if(x){free(x);}
return NULL;
}
[/code]
void foo(void) {
int x = malloc(sizeof(int));
*x = 42;
int* x_alias = x;
x = SAFE_FREE(x); // x is set to null
x_alias = SAFE_FREE(x_alias); // UB: double free
}
Mason Martinez
int x should be int* here, my bad
Michael Rodriguez
I see what you mean
Jonathan Hill
>sepples
kek, only retards use retard sepples, fucking literally javascript systems programming, multiparadigm piece of shit clusterfuck language
C forever and always
fucking C# is better than sepples, stupid sepples cucks
Angel Lewis
Both languages don't have a stable ABI making integration a pain.
Dominic Hall
>Ada's type system is so shitty they had to come up with a subset of Ada lang itself called SPARK to avoid the hole in type system
That's literally not why SPARK exists. The original SPARK was Ada with a ton of features removed (pointers, OOP, etc) and SPARK still is a subset of Ada because the prover can't manage pointers and still won't until the next iteration.
Christ the FUD is amazing on Jow Forums. You're probably the same guy who calls the type system shit because it allows for manual conversion regardless if the types agree.
Gabriel Harris
Spoken like a true ctard brainlet
Brody Diaz
enyo.de
Rust is utter garbage. No wonder it failed so miserably and is only known for webshit these days, and don't even try to pretend C++ is type safe LMAO.
Cooper Baker
>The original SPARK was Ada with a ton of features removed (pointers, OOP, etc) and SPARK still is a subset of Ada because the prover can't manage pointers and still won't until the next iteration.
Nice gymnastics
Jose Baker
You are correct sir.
William Perry
You don't even know what SPARK was designed for. You're the mental gymnastic who spams that type safety issue like it's a huge deal when it's not. It's literally the programmer doing something insanely retarded. You don't even read your own sources either since this is a problem in Ada 83.
>Addendum: Robert A Duff noted that this was already known in the Ada 83 timeframe. According to paragraph 3.7.2(4) in the standard (Ada 95 Annotated Reference Manual with Technical Corrigendum 1, MITRE Corporation, 2000, retrieved 2011-04-30), the call to Convert is erroneous on its own, and not the return statement which uses the stale reference.
If you knew anything about Ada it was used well after Ada 83, therefore proving no one cares about your shitty mistake found by some autist.
Gabriel Parker
>Rust is not safe, ada is
>gets shown article
>rust is just bad as ada
Cope
Nicholas Reed
Nobody cares about your rust-for-retro-hipsters
Brandon Hughes
Your post is a good example of how mentally ill rust users are.
Jack Thomas
Yikes another troll pretending to be retarded. Typical Rust user.
Wyatt Lopez
Tranny cope
Aaron Johnson
You are just seething because your FUD about Ada being safe got called out.
Continue seething.
Blake Reyes
I'd keep C++ and my dick intact.
Jose Gutierrez
Jose Richardson
So which is it you fucking tranny, C++ or C that you're competing with.
>no lambdas
Lambdas make ZERO SENSE in C, you can use static or inline function and the compiler will take care of the rest.
>no generics
How will you maintain compatibility with the C ABI? You fucking retard.
>no typeclasses/OOP
Thank fucking god. These make no sense in C, how will you prevent collision. You guys don't understand the C ABI with your retarded complaints.
>no standard build system
Thank god. Look at Go's. Look at Rust's for that matter.
Standardising build systems is crippling. The power of C is if you can link it, you can compile it. Fuck off back to your Mozilla sewer.
Hunter Green
>Lambdas make ZERO SENSE in C
What the fuck are you talking about? Lambda makes the perfect sense in any language I can think of, including C++. Function inlining has nothing to do with lambas making sense or not you seething cnile
>generics means no ABI
Are you putting together some buzzwords you happen to know or what? Are you clinically retarded? What the fuck does ABI have to do with generics?
>OOP prevents ABI
Oh I see you are baiting.
KYS cnile retard. Shit bait.