17.08.2020 18:25, Paul Reeves wrote:

I thought I would port the OO API examples to Object Pascal. After all, they
are quite simple, so how hard could it be?

In fact it is more difficult than I thought and I am not happy with the
results. I've done two examples - update and select - and I would like to
commit them but before doing so I'd like to discuss how we should proceed.

In my opinion we should start a new sub-directory to contain all the object
pascal code. This is because the examples will actually need several
supporting files in a common directory. It would be best if the were kept
clearly separate from other examples.

But the main problem I have found is that if I try to copy the C++ style too
closely all we end up with is very bad object pascal. It succeeds in
demonstrating the new API but does not demonstrate good programming practice.

However, if we want to demonstrate good programming practice we should
probably integrate the examples into the VCL. And that might be a step too
far.

Does anyone have any thoughts on this?

  VCL is overkill of course. We should avoid such dependencies in general 
samples.
Some thin wrappers\helper classes could be very good to have as part of Pascal 
API.

Regards,
Vlad


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to