Serialize++

Languages and libraries

serialization library

SHOW HN2019

37points
44comments
#917of 2,195 in 2019
Top 42%of 2019 by points

How HN took it

RoastedHalf or more of the comments are critical

1 positive, 5 neutral or asking, 0 mixed, 7 critical, out of 13 comments about the project. Thread score -0.28.

Execution: 0 for, 4 againstDesign: 1 for, 2 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Looks nice to use, at least for the happy path

    From 1 comment
    • Looks nice to use, at least for the happy path. I'd also say it looks a lot like the non-intrusive pattern for the boost serialization library. That's my default tool for this…
      hoistbypetard on HN

Objections

  • Names with double underscores and global namespace pollution make it unsafe to integrate

    From 3 comments
    • Being only five hundred lines doesn't disqualify it from being a library. But being impossible to safely integrate into other projects because of illegal names and polluting the…
      cygaril on HN
    • Note that names containing double underscores are reserved in C++ for the C++ implementation, which your library is not part of. Using such names can lead to all sorts of…
      zabzonk on HN
    • Some quick and dirty things to make this useful, put it all in one header and wrap your code in a namespace. No really viable as a dependency otherwise.
      unlinked_dll on HN
  • No endianness handling; not portable across byte orders

    From 2 comments
    • Does it handle endianness?
      pubby on HN
    • > The code stems for the same-machine IPC library. No point in doing any byte order normalization. Some processors can run one process in one byte order, and another process in…
      chrisseaton on HN
  • No version skew handling between differing struct versions

    From 2 comments
    • Does this work if the two communicating processes use different versions of the struct?
      kjgkjhfkjf on HN
    • It'd be useful if you mentioned this in your caveats list, since version skew is a common gotcha that some serialization technologies (e.g. protobuf) are designed explicitly to…
      kjgkjhfkjf on HN

Requests

  • Document caveats such as schema version mismatch

    From 1 comment
    • It'd be useful if you mentioned this in your caveats list, since version skew is a common gotcha that some serialization technologies (e.g. protobuf) are designed explicitly to…
      kjgkjhfkjf on HN
  • Put everything in one header and wrap in a namespace

    From 1 comment
    • Some quick and dirty things to make this useful, put it all in one header and wrap your code in a namespace. No really viable as a dependency otherwise.
      unlinked_dll on HN

Questions

  • What problem does it solve that other serialization libraries don't?

    From 1 comment
    • I’m curious what problem this is trying to solve that hasn’t been already solved in many other ways. There are so many serialization libraries for C++. The API for this isn’t too…
      hellofunk on HN
  • Does it work across different struct versions?

    From 1 comment
    • Does this work if the two communicating processes use different versions of the struct?
      kjgkjhfkjf on HN

Alternatives named

  • cereal

    From 1 comment
    • You can add https://github.com/USCiLab/cereal to your footnotes as it works in a similar way: you list the fields of your structure in a serialize function.
      Jyaif on HN
  • YAS

    From 1 comment
    • I’m curious what problem this is trying to solve that hasn’t been already solved in many other ways. There are so many serialization libraries for C++. The API for this isn’t too…
      hellofunk on HN
  • Boost serialization

    From 1 comment
    • Looks nice to use, at least for the happy path. I'd also say it looks a lot like the non-intrusive pattern for the boost serialization library. That's my default tool for this…
      hoistbypetard on HN
  • Protocol Buffers

    From 2 comments
    • I want to store data as binary, and generally I would just lay everything in arrays, write the vector size as an int, the type id (arbitrary value) as a char, write data, done. I…
      jokoon on HN
    • It'd be useful if you mentioned this in your caveats list, since version skew is a common gotcha that some serialization technologies (e.g. protobuf) are designed explicitly to…
      kjgkjhfkjf on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/21559167)