>be trans
>everyone tells me to use rust
>can't into borrow checker and rust lifetimes
>continue using c
Be trans
>>be trans
Unironically based. I don't care if I'm the only one who thinks so, I'm right and everyone else is wrong.
>>can't into borrow checker and rust lifetimes
>>continue using c
You're telling me you can't figure out the concept of annotating your code such that your mallocs can be automatically freed for you in a safe manner, so you'd rather just keep manually freeing everything?
Allow me to introduce you to assembly. It requires you to manually juggle data around in registers and manually grow and unwind the stack, so you don't have to worry about confusing concepts like "variables" and "functions" and "return statements." I think you'll be great friends
commit suicide and join the 65% tranny freak
>>be trans
Unironically disgusting. I don't care if I'm the only one who thinks so, I'm right and everyone else is wrong.
>> be trans
C and C++ (more C++) are full of trannies too. Programming is inherently an autistic pursuits and autistic people are way more likely to be trans.
>You're telling me you can't figure out the concept of annotating your code such that your mallocs can be automatically freed for you in a safe manner, so you'd rather just keep manually freeing everything?
why can't the c compiler just remember every time you malloc how fucking hard is it
Some compilers do allow you to write destructors, but its not standard.
Even though it's trivial to statically determine the *codepoint* of each malloc, the *occurrences* of each malloc in the runtime path are statically undecidable. There is not enough information, because programs accept input (in various ways, not necessarily just from stdin).
>*codepoint*
This word didn't mean what I thought it meant.
In any case, allow me to translate my previous post from retard to normal speak:
The compiler knows "where" you call malloc, as in, on which lines of code, in which functions. It doesn't know "where" you call malloc as in what will the complete description of the runtime state be when the call occurs, and how many times will it occur for that matter, because the same statement can be executed multiple times in a program. The compiler *cannot* know this, because the program can sometimes branch on conditions that cannot be evaluated until long after the program has already been compiled, such as, did the user press Y.
Just read the compiler messages?
>>be trans
How about >>kill yourself :)
so why doesn't there just a wrapper around malloc that stores each time it is called, then on exit it can just free those chunks
On exit of what? Generally even if you leak memory in your program it's reclaimed by OS on process exit anyway.
>On exit of what?
This is the central problem with that approach. There is no programatically identifiable event definitively marking where any given heap memory crosses a theoretical "point of no return" where no accessible references to it remain. The compiler cannot know *where* our "at exit" is.
>inb4 what about returning from the enclosing function
If there were a guarantee some given heap memory won't outlive the function it was allocated in, it would be safe for the compiler to be extended with a feature that deallocates the memory when the function returns, but that would be pointless, because just using stack memory instead of heap memory is a more efficient implementation of exactly that behavior wherever that guarantee happens to hold.
>inb4 what about program exit
That memory gets deallocated anyway. The point of deallocating memory in the middle of a program's lifetime is to keep the program from hogging too much memory at any point *before* it's ready to terminate.
>inb4 why can't malloc just build some kind of tree of references, so it knows what pointers are accessible at any given execution state, and periodically "flush" and auto-free all inaccessible pointers
This is called a garbage collector. C doesn't have it because garbage collectors have a small but significant memory overhead and a large performance overhead. Furthermore, C is often used for development of bootable software, such as kernels, embedded firmware, etc, and in such contexts, it's likely no allocator is available anyway.
I be not giving a fuck reported you are worse than women and soiboys
>t.
Someone took the time to draw that cute but on this wojak. What were they thinking?
/// ^ _ ^ ///
>>be trans
Based. Fuck your transphobia but eternally kekking at this pic, stealing this thanks
>try to get programming job
>be autistic white weeaboo faggot virgin
>"BACK OF THE BUS RACIST"
>say i am "non binary"
>don't elaborate further
>treated like actual royalty and set to the front of the line
>got hired doing full remote work
BY ANY MEANS NECESSARY
>>be autistic white weeaboo faggot virgin
You didn't even have to lie, all you had to tell them was that you're autistic and gay. That's already enough for a diversity hire, especially the gay part.
i am straight, "weeaboo faggot" is a term used to describe weeaboos as all weeaboos are massive fucking faggots.
why does link have the booba face
ok google: search zelda link booba face why
>all weeaboos are massive fucking faggots.
but you just said you were straight
yes i am straight, faggot doesnt mean gay my dude.
Ok isis
Only ugly people use Any Forums. Do people think the wojack works? Its projection.
>faggot doesnt mean gay
That's just a bullshit excuse homophobes use to keep saying it
Sorry to tell you that you aren't cut out for programming. I've seen it many times. People learn C and then struggle to handle anything more complicated than C (which is almost every programming language). At best you can pretend to be useful by fixing bugs in obscure software that nobody in their right mind wants to use or maintain.
correct, sodomites and their vile sickness have no place in a civilized society.
>le sodomites
Imagine being so cringe you actually think god exists