[Gambas-user] Interpreter's treatment of classes

Bruno Félix Rezende Ribeiro oitofelix at ...181...
Fri Apr 11 19:09:35 CEST 2014


Em Fri, 11 Apr 2014 16:00:23 +0300
Jussi Lahtinen <jussi.lahtinen at ...626...> escreveu:

> > However, it doesn't behave as an usual instance of
> > the class 'Class'.  For instance, it is impossible to access the
> > public methods and properties defined within the class 'Class'
> > using some expression like 'CLASS-CLASS.SYMBOL' where the
> > meta-syntactic variable 'SYMBOL' is a public symbol of the class
> > 'Class'.  Therefore, the assertion that CLASS-CLASS evaluates to
> > some object which is an instance of the class 'Class' is somewhat
> > meaningless underneath the usual concept of class/instance of
> > object oriented programming.
> >
> 
> If I have understood correctly you are referring to MMain which is
> module, not normal class.
> And in modules everything is static automatically.

I think you mean they aren't dynamic classes.  Modules are static
classes by definition, aren't they?

Anyway, the reasoning until the paragraph you quoted above is
independent of that attribute of classes; I mean, regardless of
'CLASS-CLASS' being static or dynamic every expression described until
that paragraph works the same way.  In the text I wrote, the differences
between dynamic and static classes only show up in the process of
obtaining a proper object of the class 'Class' which describes the
given class 'CLASS-CLASS', what is perfectly possible for dynamic
classes, but I fail to see how to accomplish the same with static
classes without the knowledge of its name at compilation time.

> I will look more closely later.

Please do.  Thank you.

-- 
 ,= ,-_-. =.  Bruno Félix Rezende Ribeiro (oitofelix) [0x28D618AF]
((_/)o o(\_)) There is no system but GNU;
 `-'(. .)`-'  GNU Linux-Libre is one of its official kernels;
     \_/      All software must be free as in freedom;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20140411/12617d0c/attachment.sig>


More information about the User mailing list