Why not both?

Attached: 77fd406cdf_300crop.jpg (300x200, 12K)

Other urls found in this thread:

enyo.de/fw/notes/ada-type-safety.html
enyo.de/fw/notes/unsafe-rust-type-safety.html
twitter.com/NSFWRedditGif

C++20 deprecates all other languages

And Rust deprecates C++20. :^)

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)

You can still shoot yourself in the foot in Rust, you just need to shout 'unsafe' before you do :^)

>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."

Attached: boomer.png (376x349, 56K)

Ob.

Attached: Screen Shot 2019-08-24 at 5.12.41 pm.png (506x602, 174K)

Why not [peanut butter] and [a passionate refutation of peanut butter that also tastes like peanut butter]?

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.

>unsafe {}
:^)

>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

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

Do you realize there's a rust Vulkan/dx12/Metal api that isnt just bindings? (gfx-hal)
You're off your meds

>Ada
I'm always surprised I don't see more mention of Ada in these kinds of threads

>SPARK
what about Coq

Academic masturbatory material

Ada has an excellent type system. plus high level language, excellent low level interfacing, compiled etc

enyo.de/fw/notes/ada-type-safety.html
Ada is utter garbage. No wonder it failed so miserably.

What does Coq have to do with Ada?

yep, skillful people wasting their time when they could be making c++ better. what a fucking waste

>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

Ada reminds me so much of VHDL

how do you shoot yourself in the foot in C++?
t. non-programmer who's here for /csg/

template meta programming

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.

>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.

>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

>NOOOOOOO YOU CAN'T JUST CALL MY SHITLANG SHIT

Attached: 1565781051557.jpg (785x731, 112K)

If you want to fux wit your AST at runtime, use lisp

>NOOOOOOO YOU CAN'T CALL ME OUT ON MY BULLSHIT EXCUSES

Attached: 1565355018569.jpg (1080x1012, 82K)

>ultimate chad program that only uses gotos
10 year old me had the right idea after all

>NOOOOOOOO YOU CAN'T JUST CALL ME OUT ON MY MISINFORMATION ABOUT MY SHITLANG NOT BEING SHIT

Attached: 1565632725891.jpg (785x773, 134K)

what
what

>WHAT DO YOU MEAN THIS PARTICULAR USE CASE IT'S NOT ENOUGH TO PROVE THE LANGUAGE IS SHIT

Attached: ff.png (644x800, 15K)

impartial judge here.
you have lost.
your pic was not an escalation.

>JUST DON'T LOOK AT WHERE MY LANG FAILS FOLKS JUST LOOK AWAY PLS

Attached: b6xa2ujdr2d31.png (785x1000, 254K)

This new tranny copy-pasta is...
It's... IT'S...!
Absoulutely garbage. 0/10 TL;DR'd all three times I saw it today.

>THAT amount of cope
It's working as intended

Attached: Screenshot from 2019-08-24 09-52-02.png (3062x1098, 400K)

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

>By using type-unsafe legacy C constructs.
Such as?

>if you haven't used at least 5 years of Ada your opinion on the matter is irrelevant
Are you in embedded?

Decaying arrays
void*
null pointer

why :^)

>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

I need a job, lel

no, i'm a glow in the dark nigger, why?

>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?

>I-Im glad it worked, thanks !!!

Attached: 1552937163937.jpg (589x939, 157K)

apply for job postings? you don't need Ada for 99% of the jobs and if you do you might need a security clearance :^)

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

do you need +30 years to produce quality reliable code in rust like you do in C++?

*so I imagine

>I should pass security clearance
there are different levels of sec clearances

anyways, can you write kernel level C functions?

>no mechanism to prevent double free
#define SAFE_FREE(x) ((x) != NULL && (free((x)), (x) = NULL))

i think this works

>open file
>read it
>check if free occurs 2 times in the string
>???
>profit

Never tried

Do you mean like writing kernel modules?

No... B-but thats not the point!!!!!

>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

>quality reliable code
>in C++
come on now

koder detected

>What could possibly go wrong
well, what could go wrong?

just dealing with real-time linux kernel calls

No I haven't done that, how would I learn about that? Good books?

Null doesn't mean that it has been freed, it simply means an absence of a value.

>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

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

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

>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;
}

Correction


#define SAFE_FREE(x) (x)=my_free(x)

void *my_free(void *x)
{
if(x){free(x);}
return NULL;
}

to swallow the semicolon

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

#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.

#define SAFE_FREE(x) my_free(&(x))

void my_free(void **x)
{
if(((int)(*x))>1){free(*x);}
*x = NULL;
}

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

Because both a shit.

based. learn nim

>setting the pointer to null after freeing doesn't prevent dereference through aliased pointers
Can you give an example of what you mean?

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.

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
}

int x should be int* here, my bad

I see what you mean

>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

Both languages don't have a stable ABI making integration a pain.

>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.

Spoken like a true ctard brainlet

enyo.de/fw/notes/unsafe-rust-type-safety.html
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.

>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

You are correct sir.

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.

>Rust is not safe, ada is
>gets shown article
>rust is just bad as ada
Cope

Nobody cares about your rust-for-retro-hipsters

Your post is a good example of how mentally ill rust users are.

Yikes another troll pretending to be retarded. Typical Rust user.

Tranny cope

You are just seething because your FUD about Ada being safe got called out.
Continue seething.

I'd keep C++ and my dick intact.

Attached: Screenshot_2019-03-01 g - 1 33 0 is out - Technology - 4chan.png (1066x809, 282K)

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.

Attached: rust-fag.png (906x520, 45K)

>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.