On 06/05/2016 13:56, Dimitry Sibiryakov wrote:
> 06.05.2016 18:45, Adriano dos Santos Fernandes wrote:
>> There is no ambiguity.
>>
>> You can see similar operations in any file/path API you look for: qt,
>> Java, C#, etc. A good source to not reinvent the wheel with bad semantics.
>    I see that QFile and File in Java indeed have constructors with two 
> parameters: path 
> and file name. In this case indeed there is no ambiguity (if usage of this 
> constructor is 
> properly documented), but I cannot remember any usage for such constructor in 
> current code.
>
It's because File and String in Java are immutable but our classes are not.

But whatever you want to preserve (not uncommon) the original objects,
you'd better use a constructor than copy and object and append to it.

The constructor may call the append method internally, possibly
pre-reserving the space when allocating the buffer.


Adriano


------------------------------------------------------------------------------
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