by gdubs · 11y ago · 0 comments
I think you've correctly identified the source of confusion -- value vs reference. To you, that might be plain as day. But, to many iOS devs, they really couldn't explain the nuances.
I mean, look how much trouble beginner programmers have with the concept of Pointers for pete's sake.
But, I think you're right -- weird rules and guidelines just confuse the issue.
Andy Matuschak's functional swift talk puts the ref vs value discussion in practical terms of a Khan Academy drawing app:
I've never written a line of Obj-C or Swift in my life, but all you have to tell me is "struct = value based, class = referenced based" and I immediately know how it works...
It has to do with learning stuff on a lower level -- whether or not you attend a school to do so. Us autodidacts who grew up on assembly language and C code will beg to differ on your use of the word "prevents".
Do you have any books or exercises to recommend to help further my understanding of low-level computing? I'll be taking too and compilers in the fall, but I'd like to keep digging on my own.