New() Method with Abstract Method() in Base Class

BlitzMax Forums/BlitzMax Programming/New() Method with Abstract Method() in Base Class

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm sure it's possible but it would require that the compiler check to see just what kind of object is being made whenever the base class constructor was called, and then call the virtual method in cases where the actual type of the object being created is the derived type. Of course, it would have to delay the call until after the derived type was created - seeing as the derived type constructor could very well rely on information from the base type. At that point, it's no different from simply calling the method from the derived class's constructor, except for the overhead.

I'm assuming it wasn't included in the compiler design due to the speed sacrifice it calls for.