[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


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
>>
>>106719011
sex with pointers
>>
>>106719047
if (ptr) *ptr ... challenging stuff
>>
>>106719141
Once you start using them it leads to all kind of errors, segmentation faults, memory leaks.
>>
>>106719161
Works on my machine. The only issue is fucking alignment once you get to the fun stuff.
>>
File: monaghan.jpg (77 KB, 496x531)
77 KB
77 KB JPG
>>106719011
Hmmm.... 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
>>
>>106719047
Sub-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.

>>106719161
I 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.
>>
>>106719047
But 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.
>>
File: rust-security.jpg (181 KB, 1793x1179)
181 KB
181 KB JPG
>saar, pointer is complicated!
>we need language to prevent pointer from being misused
>it is more secure, saar
>>
File: zero-cost.png (281 KB, 900x966)
281 KB
281 KB PNG
>also, saar, think about the optimal runtime
>like efficient cash allocation and ensuring data is accessed in correct order
>>
>>106719366
Don't malign us jeets with this retardation. Pointers are piss fucking easy. Whatever breed that mongoloid is, we don't claim him.
>>
>>106719617
All 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!!!!!!
>>
>>106719768
That'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
>>106719708
Pointers 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.
>>106719760
I'm not advocating for any language.
>>
File: rust-breaking-linux.png (199 KB, 802x842)
199 KB
199 KB PNG
>>106719853
>saaaaaaarrrrr! it's incomplete project!!! do not post screenshot!!!
>>
>>106719863
You 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.
>>
>>106719617
That'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
>>
>>106720078
nullability, 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!
>>
>>106720170
I used rust as an example. You can use any modern language or a gc language. You are a legit moron.
>>106720052
no
>>
>>106720140
You can't have null reference or re-assignable references?
>>
>>106719695
Go 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
>>
>>106720300
what are talking about? speak like a human you rot brained freak
>>
>madarchod, use normal hindu syntax!!
>i can't understand your talk!!!
>>
>>106720251
>null reference
char* ptr = nullptr;
char& ref = *ptr;


>re-assignable references
char a = 'a';
char b = 'b';
char* ptr = &a;
char*& ref = ptr;
ref = &b;
>>
>>106720078
References 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.
>>
>>106720504
thanks AI
>>
>>106720527
Pointers are 8 bytes each. A reference is just an alias, no memory overhead.
>>
>>106719695
hahahahahahahahaahha
C 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?
>>
>>106720648
There 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!
>>
>>106720648
it's a fake chart



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.