Re: [Q] OOP IDL and the self parameter ... [message #12087] |
Sun, 28 June 1998 00:00 |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Darran Edmundson writes:
> Why do data members of a class have to be referred to as
> components of self? Surely the compiler, having run
> through CLASS__DEFINE, knows which variables are local
> in scope to a method and which are class variables? It
> seems like a needless complication to clutter up my
> methods with self.classdata1, self.classdata2, etc.
>
> Being relatively new to OOP, is there a method behind
> this madness?
Being completely new to OOP myself, this seemed to me more
common sense than madness. :-)
Perhaps IDL *could* know that classdata1 is a local variable,
but IDL objects are implemented as IDL structure variables.
Without completely creating a new variable type in IDL,
which I presume would have taken longer than RSI wanted to
take, this seems a sensible and straightforward approach.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|