<p>Am 07.02.2017 14:31 schrieb "Graeme Geldenhuys" <<a href="mailto:mailinglists@geldenhuys.co.uk">mailinglists@geldenhuys.co.uk</a>>:<br>
> I never understood Object Pascal's class methods/properties either?<br>
> Unlike Java, not everything needs to be in a class. We are allowed to<br>
> have procedures or functions, and global ones at that. So in Object<br>
> Pascal we could simply have a unit called FooStuff where everything<br>
> related to Foo is defined, then have a global function F() and then use<br>
> it as follows...</p>
<p>It allows for grouping. This way one can directly see (by using the completion window or by peeking at the declaration oneself) that there is a routine F() that belongs somehow to TFoo. If you put that into a separate unit however then it isn't clear by itself that the stuff relates to TFoo.<br>
In the end it's a question of taste. I personally like class methods and class properties.<br>
Oh and don't forget that non-static class methods can be virtual (sometimes I really miss that in C++).</p>
<p>Regards,<br>
Sven</p>