2 ms·
> But there's a lot of hokey, amateurish stuff in there... with more added all the time. Let's start with the arbitrary "structs are passed by value, classes by
by raw_anon_1111 9mo ago
> But there's a lot of hokey, amateurish stuff in there... with more added all the time. Let's start with the arbitrary "structs are passed by value, classes by reference." And along with that: "Prefer structs over classes."
This is the same way that C# works and C and C++ why is this a surprise?
- AlexandrB 9mo agoNeither C++ nor C pass classes by reference by default (what even is a C "class" other than a struct?).
- raw_anon_1111 9mo agoYou are correct - it’s been ages since I’ve done C. The distinction is in C#.