Nor should they.
Learning C++ today is like trying to learn how to drive a bicycle from 1860.
Better to learn how to cycle on a modern bicycle instead.
Pointers are ridiculously simple. It is literally just an address in memory.
What people don't teach you is that the reason pointers are """hard""", is because they're hard to use and reason about. Use after free etc.
There's nothing else to know. It's literally just a matter of git gud.
Every time you deference a pointer the underlying system sends an email to Bjarne Stroustrup who has to look up your memory address in a giant spreadsheet and then sends it back to you your pc via sms-over-html where it's interpreted by your cpu using special hardware registers.
its quite amazing how monoculture rust troons are, they were shilliing helix vim clone the other day and i could just tell by looking at it was yet another remake other thing in rust project beofre looking i just knew
It’s as if Neovim and Kakoune had a baby that was deformed and retarded with no upgradability. It has more keys to press for an edit in kak or vim. >t. Kak enjoyer
Fuck rust trannies and their “I rewrote this in rust” cancer
Pointers are ridiculously simple. It is literally just an address in memory.
What people don't teach you is that the reason pointers are """hard""", is because they're hard to use and reason about. Use after free etc.
There's nothing else to know. It's literally just a matter of git gud.
>t. Dunning Kruger retard
No, they aren't. They have a type and also have provenance. A random address without any valid object isn't a well defined pointer.
>A random address without any valid object isn't a well defined pointer.
void* p = (void*)1234;
Compiles fine because a random address without any valid object is literally ALL a pointer is.
void* p = (void*)1234;
int* q = (int*)p;
Also compile fine because you are promising the compiler(you are lying) that the address 1234 really is readable and really does contain an int. Or a Foo or whatever other type you want to use.
For all you know, 1234 could be readable on the machine and if it is, then data can indeed be interpreted as an int. It is the programmers job to manage the memory and its meanings, not have this task dogmatically imposed by ineffectual committees of Californian insiders.
Why? What university program doesn't force you to at least take MIPS assembly programming anyhow? Nothing about assembly is problematic outside of the levels of garbage that AArch64 and x86 expose to reduce code sizes. No one would learn anything of value from modern asms, outside of maybe risc-v since it's so patent averse and mostly simplistic outside of variable length instructions.
don't look into the totally real companies who "amplify black voices" that mozilla gives millions to every year! Surely those are ACTIVIST organizations and totally not fronts used to market!
>exclaim that c++ is a retarded language >immediately all the cniles come out and screech about rust
Jesus. Rust is merely slightly less retarded, calm your fucking tits.
>cniles think this is readable code
I still maintain my theory that you are the only frogposting homosexual in this board who uses the word "cnile". Just go somewhere else, dude.
I might shitpost a little here and there, but calling me a frogposter is going too far. Fuck you.
Nobody here knows how pointers actually work.
Nor should they.
Learning C++ today is like trying to learn how to drive a bicycle from 1860.
Better to learn how to cycle on a modern bicycle instead.
Are 19th century bicycles really that fundamentally different from 21st century bicycles?
Yeah, e.x. a wide adaptation of gearing system
reust tranny
>Nor should they.
This.
Every time you deference a pointer the underlying system sends an email to Bjarne Stroustrup who has to look up your memory address in a giant spreadsheet and then sends it back to you your pc via sms-over-html where it's interpreted by your cpu using special hardware registers.
Fucking stupid analogy.
its quite amazing how monoculture rust troons are, they were shilliing helix vim clone the other day and i could just tell by looking at it was yet another remake other thing in rust project beofre looking i just knew
It’s as if Neovim and Kakoune had a baby that was deformed and retarded with no upgradability. It has more keys to press for an edit in kak or vim.
>t. Kak enjoyer
Fuck rust trannies and their “I rewrote this in rust” cancer
Helix is better because I don't have to write code to make my editor do things it should just do. I'm sorry you're too retarded to understand.
>how to drive a bicycle from 1860.
The fuck he meant by this?
Pointers are ridiculously simple. It is literally just an address in memory.
What people don't teach you is that the reason pointers are """hard""", is because they're hard to use and reason about. Use after free etc.
There's nothing else to know. It's literally just a matter of git gud.
>t. Dunning Kruger retard
No, they aren't. They have a type and also have provenance. A random address without any valid object isn't a well defined pointer.
>pointers have a type
nu-uh
>akshually
Bro I don't give a fuck about C++ or Rust or whatever you pulled shit out of
I'm talking about the C standard which is platform independent. It describes an abstract machine.
>object
anyways yes it is. on x86 dereferencing that address will signal a page fault.
>A random address without any valid object isn't a well defined pointer
and yet void* pointers ARE well defined in the standard.
>A random address without any valid object isn't a well defined pointer.
void* p = (void*)1234;
Compiles fine because a random address without any valid object is literally ALL a pointer is.
void* p = (void*)1234;
int* q = (int*)p;
Also compile fine because you are promising the compiler(you are lying) that the address 1234 really is readable and really does contain an int. Or a Foo or whatever other type you want to use.
For all you know, 1234 could be readable on the machine and if it is, then data can indeed be interpreted as an int. It is the programmers job to manage the memory and its meanings, not have this task dogmatically imposed by ineffectual committees of Californian insiders.
>compiles fine
still UB and summons nasal demons
C:
Type error, not same type!
Developer: the types are compatible, fuck you, I'll just typecast it
Other typed languages:
Type error
Developer has to go through the motions to convert the type
Untyped languages:
Lol unexpected behaviour
It is not UB, lol. It will compile to what you are telling him to compile, maybe you think assembly is UB.
https://godbolt.org/z/3Kc8YM7E8
For example, the address of VGA text mode is always 0xB8000.
A pointer holds the value of an address in your PDP-11's memory. It's that simple.
>"Void P Star Equals And X Semicolon"
OP, try translating your headlines from Martian before posting them.
shouldn't it be
> void * p = &x;
?
Yes the star comes before, i'm sorry
you have failed in your duty anon. Your punishment will be a return to Python Purgatory
i think assembly should be the first cs class in order to weed out everyone who cannot understand pointers and memory in general
Yes, that way we could leave only the straight white males.
Why? What university program doesn't force you to at least take MIPS assembly programming anyhow? Nothing about assembly is problematic outside of the levels of garbage that AArch64 and x86 expose to reduce code sizes. No one would learn anything of value from modern asms, outside of maybe risc-v since it's so patent averse and mostly simplistic outside of variable length instructions.
void *p = &p;
> Array<int const * const> const * const my_const_array_do_not_touch
Post was so good to the point OP failed to declare a pointer properly kekw.
im convinced the rust push is inorganic paid shills cause of its MIT cuck license dont get me wrong i love bsd's
don't look into the totally real companies who "amplify black voices" that mozilla gives millions to every year! Surely those are ACTIVIST organizations and totally not fronts used to market!
>exclaim that c++ is a retarded language
>immediately all the cniles come out and screech about rust
Jesus. Rust is merely slightly less retarded, calm your fucking tits.
not a single mention of the anatomy of a virtual memory address on linux / windows
I should've asked her out. why did I think a woman could do systems programming projects on her own?
she looked like Aubrey Plaza.
What am i even looking at?
uintptr_t* p = &p;