I'm getting ready to launch another long-winded project inquiry for feedback from you guys, cause I'm still working on the finer points of class implementation in my stubborn head.
While I was playing around with an idea, I was reading about class vs. instance variables. I tried a few in multiple instances of a class, and I don't really get the big difference. Instance variables are definitely harder to get at -- it appears the class must have a method that is called to set/get the values within each instance from/to the outside world, but other than that, what's the big deal? Class vars are still unique to each instance, they're just reachable directly from the outside.
Am I missing something fundamental here? Please toss out whatever comes to mind.
Thanks.
While I was playing around with an idea, I was reading about class vs. instance variables. I tried a few in multiple instances of a class, and I don't really get the big difference. Instance variables are definitely harder to get at -- it appears the class must have a method that is called to set/get the values within each instance from/to the outside world, but other than that, what's the big deal? Class vars are still unique to each instance, they're just reachable directly from the outside.
Am I missing something fundamental here? Please toss out whatever comes to mind.
Thanks.
Comment