[fpc-devel] Generics.Collections as package for Lazarus or package for FPC RTL
silvioprog at gmail.com
Wed Jan 27 14:28:27 CET 2016
On Wed, Jan 27, 2016 at 6:22 AM, Michael Van Canneyt <michael at freepascal.org
> Assume we introduce namespaces, do things 'Properly' and introduce
> (the names are just examples, to make a point)
> Now let's take example existing routines such as
> Where do we put them ?
> Both units are a candidate. The former because it is about filenames.
> The latter because they are purely string operations.
> Your namespace doesn't solve this problem.
ExtractFilePath/ExtractFileName sounds more related to file operations, so:
TFile = class sealed(TObject)
class function ExtractPath ... ; static;
class function ExtractName ... ; static;
function ExtractPath ...;
function ExtractName ...;
(btw the example above needs the -NS feature)
IMHO, if the <context> already is called "file", you don't need to add the
context name again in the function name, so instead of:
So, you can do <context>.code-completation to get all the features to this
Once more, the above is purely theoretical discussion; I am not opposing
> anything, just pointing out that the use of namespaces is
> and remains a matter of preference (or even fashion/hype).
Both approaches compiles, but I agree the it is a preferencial thing.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel