bugs, incompatibity, function attributes_(re)

Wed, 2 Jul 1997 10:47:23 +0100 (BST)


On Wed, 2 Jul 1997 00:56:42 +0200 (MET DST) Peter Gerwinski 
 wrote:
>According to The African Chief:

[...]
>> 3. Delphi's "name" directive;
>> This is exactly the same as GPC's "asmname" directive. We can 
>> implement this simply by also allowing just the use of "name" in any place
>> where "asmname" would be allowed (i.e., we can dispense with the "asm"
>> part of the "asmname" directive). That way, we get the best of both worlds!
>
>Sounds reasonable.  So should we just change "asmname" to "name"?
>Or keep both?

I think we should keep both. "Asmname" is intuitive, but 
"name" is good for Delphi compatibility.

/ begin off-point

On the question of Delphi compatibility, any chance of 
supporting Delphi's "Class" construct? I know that there 
are enough differences between "Class" and "Object" 
to make supporting "Class" a  non-trivial exercise, but
we could make a start. As a starting point, I suggest this
(if it won't be too difficult, and if it won't distract you
from other more pressing things);

1. Allow this to compile;
  Type MyFoo = Class
      { blah, blah }
  end;

2. [a] a Class instance becomes a pointer to the class;
    (or is it that the Class itself is a pointer to an object/class?);
	e.g.,  "Var Foo : MyFoo" 
	=       "Var Foo : ^MyFoo" in the current OOP model	
   [b] the constructor does the heap allocation stuff,
	e.g., "Foo := MyFoo.Create"
		*allocates memory for Foo "(New, Foo)"
		*calls Foo^.Create (constructor)
		*Foo now points to whatever
                       "Foo.Create" - should generate an exception
                       because Foo needs to be assigned to the 
	       constructor
   [c] deference it automatically;
	e.g., "Foo.Bar := 12" (instead of "Foo^.Bar := 12")

3.  Allow virtual constructors (or at least, don't reject the
"virtual" directive in a "Class" constructor's definition)

4.  Virtual methods to be overridden must be overriden
with the "override" directive; the "virtual" directive merely
creates a new method (or at least, don't reject the
"override" directive in a "Class" definition)

5. Allow "Published" methods (or at least, don't reject the
"published" directive in a "Class" definition).

6. All classes to have the same ultimate ancestor object.

Of all these, numbers 1 and 2 are the most pressing (for me
at least), and will go a long way to improving GPC's Delphi
compatibility. The others are not that urgent and can come 
much later (perhaps they can be added to the "to do" list).

Does this sound like too much of a distraction at present?

/ end off-point

Best regards, The Chief 
Dr Abimbola A. Olowofoyeku (The African Chief, and the Great Elephant)
Author of:  Chief's Installer Pro v3.60 for Win16 and Win32.
Homepage:  http://ourworld.compuserve.com/homepages/African_Chief/
E-mail: laa12@cc.keele.ac.uk



The African Chief (laa12@cc.keele.ac.uk)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es