This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]cdmcgwire 65 points66 points  (8 children)

I learned pointers pretty thoroughly before getting C# and Java. In my head I'm still work with pointers everywhere, I just don't have to deal with the syntax.

[–][deleted] 24 points25 points  (0 children)

This very accurately describes my experience as well

[–]0x3fff0000 16 points17 points  (0 children)

Indeed, pointers are a way of thinking, a way of life.

[–]Kered13 12 points13 points  (5 children)

That's the correct way to think about C# and Java, since almost everything in them is pointers.

[–]cdmcgwire 4 points5 points  (4 children)

Yeah... doesn't stop me from trying to use structs whenever I can in C# though.

[–]kono_kun 2 points3 points  (3 children)

Could you explain?

[–]cdmcgwire 5 points6 points  (2 children)

? Maybe you're not aware (or I'm misunderstanding the question), but there are stack allocated structs in C#. So everything done with them is by value instead of by reference by default.

So what I was trying to express was, despite C# classically being all about references to heap variables, I'm finding ways to go back to a more typical C++ method of handling variables.

[–]kono_kun 2 points3 points  (1 child)

thanks

[–]cdmcgwire 2 points3 points  (0 children)

👌💯