On 05/06/2016 08:41 PM, Adriano dos Santos Fernandes wrote:
> On 06/05/2016 14:16, Dimitry Sibiryakov wrote:
>> 06.05.2016 19:03, Adriano dos Santos Fernandes wrote:
>>> Yes, PathName may represent a relative path, but generally (always?) you
>>> know that a path read from somewhere will or not going to be appended
>>> with a parent path.
>>     No, on contrary in current code they are always split or combined with 
>> something else.
>>
>>> So these names is better represented as strings, they are not about real
>>> files.
>>     And this is exactly why we have current problem with platform-dependent
>> case-sensitivity and encoding. "Just a string" just doesn't work.
>>
> We should think on separation of concerns in utility classes.
>
> A PathName should not know anything about Firebird. It should be a
> PathName for Firebird, project X, Y, etc.
>
> So it could allow to concat another PathName, but with an explicit
> method (not with operators or constructors) as this is not common operation.
>
> If you have a comparation problems of strings that are file paths, you
> have a problem in another layer. It's not a PathName problem. You could
> use PathName in this layer to solve.
>
> PathName problem is to compare two PathNames.

Agreed with everything till here.

> And common operation is to
> append a file name (generally represented in a string) to it.

Not agreed.
Why file name should be represented as a string, not PathName? It does 
not follow from what you say before. Moreover, if we need to correctly 
compare that file name with another one we must "use PathName ... to 
solve". I.e. to correctly work with file name it should be represented 
as PathName, not generic string.


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to