Re: [Firebird-devel] IUtil::formatMessage

2016-12-01 Thread Adriano dos Santos Fernandes
On 01/12/2016 15:22, Dimitry Sibiryakov wrote:
> 01.12.2016 18:01, Adriano dos Santos Fernandes wrote:
>> IStatus is meant to be implemented by who wants to have whatever way to
>> manage its memory.
>And whoever implements own way to keep status is in the best position to 
> implement 
> interpretation of the status, right?
>
>> And format does not depend on that, so it's not a IStatus method.
>If someone implement IStatus that uses different storage format (for 
> example, linked 
> list of clumplets instead of plain array of them), code in IUtil won't be 
> able to 
> interpret it.
>
IStatus should adhere to the contract of status vectors. formatMessage
is a function operating on that contract.

You want to implement a different format, implement it.

You want to implement a different internal status management, implement it.

Two things, two implementations.

The contract of IStatus with intptr's in the public API are awful, it
breaks cloop ability to implement cross bindings automatically, and I
hate to see that in the final API. But it's a different thing in
relation to this thread subject.


Adriano


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


Re: [Firebird-devel] IUtil::formatMessage

2016-12-01 Thread Dimitry Sibiryakov
01.12.2016 18:01, Adriano dos Santos Fernandes wrote:
> IStatus is meant to be implemented by who wants to have whatever way to
> manage its memory.

   And whoever implements own way to keep status is in the best position to 
implement 
interpretation of the status, right?

> And format does not depend on that, so it's not a IStatus method.

   If someone implement IStatus that uses different storage format (for 
example, linked 
list of clumplets instead of plain array of them), code in IUtil won't be able 
to 
interpret it.

-- 
   WBR, SD.

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


Re: [Firebird-devel] IUtil::formatMessage

2016-12-01 Thread Adriano dos Santos Fernandes
On 01/12/2016 14:56, Dimitry Sibiryakov wrote:
>Hello, All.
>
>Reading of Helen's book made me wonder: why formatMessage is the method of 
> IUtil, not 
> IStatus?
>
IStatus is meant to be implemented by who wants to have whatever way to
manage its memory.

And format does not depend on that, so it's not a IStatus method.


Adriano


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