std.serialization: pre-voting review / discussion

Dicebot public at dicebot.lv
Sat Aug 17 04:20:16 PDT 2013


On Saturday, 17 August 2013 at 08:29:37 UTC, glycerine wrote:
> On Wednesday, 14 August 2013 at 13:43:50 UTC, Dicebot wrote:
>> On Wednesday, 14 August 2013 at 13:28:42 UTC, glycerine wrote:
>>> Wishful thinking aside, they are competitors.
>>
>> They are not. `std.serialization` does not and should not 
>> compete in Thrift domain.
>
> Huh? Do you know what thrift does? Summary: Everything that
> Orange/std.serialization does and more. To the point: Thrift
> provides data versioning, std.serialization does not. In my 
> book:
> end of story, game over. Thrift is preffered choice. If you
> are going to standardize something, standardize the Thrift
> bindings so that the compiler doesn't introduce regressions
> that break them, like happened from dmd 2.062 - present.
>
> You don't provide any rationale for your assertion, so I can't
> really respond more constructively until you do. Please
> familiarize yourself with D's Thrift bindings, which work well
> with dmd 2.061. Then provide a rationale for your conjecture.

Yes I know what Thrift does and that is not what it is needed 
here. Important things to consider:

1) Having bindings in standard library is discouraged, we have 
Deimos for that. There is only curl stuff and it is considered a 
bad solution as far as I am aware of.

2) Thrift covers very wide domain of tasks - protocol 
descriptions, inter-operation between different versions, 
cross-language operation. `std.serialization` is about one simple 
task - taking care of D type reflection to load/store them in 
some way.

3) UNIX-way. Standard library must provide small self-sufficient 
components that focus on doing one job and doing it good. It is 
up to user to combine those components to build behavior he needs 
in actual application. In that sense core of std.serialization 
must be evaluated from the point of view "does it allow me to add 
feature X?" instead of "does it have feature X?"

4) There are lot of different serialization use cases and often 
having something like Thrift is a huge overkill. Good standard 
library allows user to chose only functionality he actually 
needs, no more.

There is nothing wrong with your choice of Thrift - it just does 
not belong to std.serialization


More information about the Digitalmars-d mailing list