To construct or not?

BlitzMax Forums/BlitzMax Programming/To construct or not?

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.

Unless you need to call some specific Create function instead of New, there's no really good reason for it other than preference and coding style.

I personally have no preference, it just depends on what I'm doing at the time. If I know the object has to be initialized before anything else, chances are I'll throw it in the Field definition instead of the constructor unless I have to set some values in it, in which case I would put the creation in the constructor as well just in case something in BMax changes that causes the fields to be initialized after the constructor (would be weird, but you never know).