ancapdev / LightBSON.jl

High performance encoding and decoding of BSON data in Julia
MIT License
20 stars 4 forks source link

Add link to BSONify #9

Open OliverColeman opened 2 years ago

OliverColeman commented 2 years ago

HI, just wondering if you could please add a link to my BSON encode/decode package in the "Generic serialization of all Julia types to BSON" line in the README?

ancapdev commented 2 years ago

Hi, I had look at your package and as far as I can tell it's adding methods to functions defined in Mongoc.jl for types it doesn't own, i.e., type piracy. Since this can introduce behaviour changes to users who don't expect it (e.g., your package is imported transitively through another dependency), it's not to be encouraged. Have you considered instead to see about upstreaming extensions to Mongoc.jl directly?

OliverColeman commented 2 years ago

Hmm, the last line of the Avoid type piracy section is "Another example might be a package that acts as a thin wrapper for some C code, which another package might then pirate to implement a higher-level, Julia-friendly API," and Mongoc.jl self-describes as a thin wrapper for a c library... In any case I did contact the author of Mongoc.jl about extending their package and if I understand correctly they suggested that I take this approach: https://github.com/felipenoris/Mongoc.jl/issues/74