[fpc-pascal] Class constructor called unconditionally
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Thu Mar 31 17:28:08 CEST 2016
On 2016-03-31 16:06, Michael Van Canneyt wrote:
> I am guessing it comes from C++/Java/C#, which AFAIK do not have
> the 'initialization' section. But that's just a guess.
[my personal opinion - feel free to ignore this paragraph]
I hate such "features" pulled in from other languages, when Object
Pascal already had perfectly good solutions (Object vs Record with
Methods is another example). It really feels like it is polluting the
Object Pascal language.
> I usually have a 'Start Application' kind of routine where I register all
> the necessary things, link things together (needed if you follow 'loosely
> coupled' design).
I do the same. The tiOPF project follows a similar path in the core
framework and its UnitTest suite. It works well.
Regards,
- Graeme -
More information about the fpc-pascal
mailing list