According to Frank Heckenbach:
Besides, removing "asmname" would break some existing programs (including a published one of mine)...
Okay, I will let it in.
So "class" = "pointer to object", approximately...
It's "class" = "reference to object". Fortunately, the GCC front-end is able to deal with such things, so we "only" have to implement the syntax into GPC - and take care that it doesn't break other applications of reference types such as `Var' parameters and procedural variables.
[Constructors and destructors ...]
We should try to be compatible to Delphi and the ANSI Object Pascal draft.
This reminds me of C++'s "reference types" (not only for objects, but for any types). I.e., a pointer internally, but dereferenced automatically when necessary. I think they could be quite useful sometimes, anyway, and if they'll be implemented (syntax?), we'd have "class" = "reference to object"...
General-purpose reference types? :-/ That's C++'s workaround for the missing `Var' parameters. I think this would cause more confusion than goods.
[public, published, private, protected, ...] So, perhaps we could allow all those keywords, including "published", in any order, also possibly repeated (unlike BP).
I agree.
- All classes to have the same ultimate ancestor object.
The same discussion as with objects recently... ;-) Is this really necessary (if so, for what?), or is it sufficient if all classes in a given library use the same ancestor by convention?
I don't like this at all. This is very useful as a convention when writing a library, but it is not the job of the compiler. Since Delphi seems to do it this way, GPC should behave the same in `--delphi' mode, but not by default.
Greetings,
Peter
Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201] maintainer GNU Pascal [970624] - http://home.pages.de/~gnu-pascal/ [970125]