6 ms·
Use a decent IDE. Most render & at the call site so you know. I find this all a bit rich anyway. In languages like C#, everything is a bloody reference and thi
by nly 3y ago
Use a decent IDE. Most render & at the call site so you know.
I find this all a bit rich anyway. In languages like C#, everything is a bloody reference and this lame concept of "reference types" corrupts developer minds.
- pjmlp 3y agoJava or Python would have been a better example, as that isn't the case with C#.
- raincole 3y agoI'm pretty sure one of the biggest differences between C# and Java is that in C# you can't assume everything is a reference. A strict is passed by value.
- fluoridation 3y agoNo, strings are passed by reference, it's just that the string type is immutable. Passing a string to a function doesn't create a copy, but there's also no way for the callee to modify the object that the caller points to. It is true that C# has value types that are by default passed by copy, though.
- raincole 3y agoI mistyped struct as strict.
- lelanthran 3y ago> Use a decent IDE. When I'm navigating code, the references aren't a problem, because I am using an IDE of some sort, usually. The complaint I made was about reading, not navigating, for example when reviewing a PR.
- uxp8u61q 3y agoUse a decent IDE that allows you to review PRs from within the IDE.
- tubs 3y agoJava and c# are both pass by value (c# has optional ref that must be annotated at both the call site and definition, it also has value structures). Class types are effectively pointers that are passed by the value of the pointer. You cannot implement swap in Java without eg wrapping the params in one element arrays.