If H-1B workers are so skilled why do they need a book to understand pointers?
>put value in address>use value at address>free value at address
>>106719035>use value at address
Pointers are fucking complicated.
>>106719011>using * for THREE(3) different things is a perfectly fine idea what could possibly go wrong?bravo cniles
>>106719011sex with pointers
>>106719047if (ptr) *ptr ... challenging stuff
>>106719141Once you start using them it leads to all kind of errors, segmentation faults, memory leaks.
>>106719161Works on my machine. The only issue is fucking alignment once you get to the fun stuff.
>>106719011Hmmm.... good point.
>>106719041>fuck value at address
>>106719011>If H-1B workers are so skilled why do they need a book to understand pointers?I don't know or care about jeets but this thread makes me think about the fact that most people are confused by any kind of indirection they're not used to. Also, indirection is one of the most powerful and fundamental concepts in logic and computation. It deserves a book. With maybe like a chapter about pointers.
C was archaic shit the moment it released
>>106719047Sub-90 IQ mongoloid (=jeet) detected. How one could think pointers are a difficult concept to comprehend is utterly puzzling to me, unless you're literally retarded, then I guess it's understandable.>>106719161I don't know of a single piece of software (beyond toy examples) which doesn't use pointers in some way, Ranjeet. Plus, if we don't count arrays as pointers, you can easily create the same sorts of errors that way.
>>106719047But they are the simplest reference type?
There is more to pointers than just addressing. Things like pointer tagging, ensuring that references remain valid during it's lifetime, object relocation for better allocation performance, preventing overflow with proper bounds check, ensuring that data is accessed sequentially for better cache use, proper pointer arithmetic for different data types etc... can have a lot of caveats and cause subtle bugs. Nothing is easy when working with raw pointers. If you don't believe me then look underneath the abstractions over pointers in languages like rust where the interface tries to prevent pointers for being misused.
>saar, pointer is complicated!>we need language to prevent pointer from being misused>it is more secure, saar
>also, saar, think about the optimal runtime>like efficient cash allocation and ensuring data is accessed in correct order
>>106719366Don't malign us jeets with this retardation. Pointers are piss fucking easy. Whatever breed that mongoloid is, we don't claim him.
>>106719617All those things are secondary and emergent from addressing. And none of them need a new language. Cope.
>>106719740>saar, we did not redeem this one!!!!!!
>>106719768That's what I said, yeah. You don't need to make strawmen when that's exactly what I said.If you can't wrap your head around memory addressing, we're not claiming you. I've never met someone who can't.
>>106719695>>106719708Pointers aren't conceptually complicated but using it properly is not easy. There is a reason why paradigms like RAII emerged.Also give source for the first image. The second image is just prs for an incomplete project.>>106719760I'm not advocating for any language.
>>106719853>saaaaaaarrrrr! it's incomplete project!!! do not post screenshot!!!
>>106719863You do realize that no programming language prevents logic errors. Also I don't particularly care for rust. There are legitimate criticisms of the language. I just don't like cargo cult retards like you who has zero clue about anything.
>>106719617That's just something the compiler does during compilation.
question.what is the point of pointers when you can pass variables by reference? that is one thing i never understood
>>106720078nullability, reassignment, direct memory manipulation...
>>106720016>saaaaar??? pointer is hard>it is causing many security exploit and inefficiency>this is why we have languages like Rust to prevent pointer misuse>but that doesn't mean language like Rust prevent saars from committing logic error!>saar, please understand and stop cargo cult screenshot about Rust bugs and inefficients!
>>106720170I used rust as an example. You can use any modern language or a gc language. You are a legit moron. >>106720052no
>>106720140You can't have null reference or re-assignable references?
>>106719695Go chads I fukkin knvvl
>>106720246>saaar, i only use a programming language that cause exploit and inefficiency as an example!!>i also get mad about cargo cult screenshot only as an example!>please understand, madarchod
>>106720300what are talking about? speak like a human you rot brained freak
>madarchod, use normal hindu syntax!!>i can't understand your talk!!!
>>106720251>null referencechar* ptr = nullptr;char& ref = *ptr;>re-assignable referenceschar a = 'a';char b = 'b';char* ptr = &a;char*& ref = ptr;ref = &b;
char* ptr = nullptr;char& ref = *ptr;
char a = 'a';char b = 'b';char* ptr = &a;char*& ref = ptr;ref = &b;
>>106720078References are fucking stupid, why not just use pointers? A reference is basically just a pointer that can't be null, a stupid abstraction that could just be handled by making sure the programmer checks validity as necessary.
>>106720504thanks AI
>>106720527Pointers are 8 bytes each. A reference is just an alias, no memory overhead.
>>106719695hahahahahahahahaahhaC and C++ I understand...because it's easy to shoot yourself in the foot if you don't know what you're doing. But I was under the impression that the whole point of Rust was to make that much, much harder to do. And be more secure by default. I mean... wtf is that chart. The only counter I can see would be something related to using 'lines' as a measurement. Is Rust concise or verbose?
>>106720648There is no way it's more verbose than C with its extensive standard library and all the abstractions it offers. It simply tuns out that a programming language that makes programming as tedious as possible, attracts mainly subpar programmers who care more about ideology (safety ideology, tranny ideology or usually both) than actual programming. Big shocker there!
>>106720648it's a fake chart