When and why using serialization?

Hello.

Quite often I see at julia-discourse threads speaking about “serialization” on Julia.
When and why do you use serialization? Just to save objects? or do you use it to share data between threads or something more obscure?

https://docs.julialang.org/en/v1/stdlib/Serialization/#Serialization-1

Think of this as a trade-off:

        ^
        | serialization
        |
support | 
for     |
native  |           JLD2, BSON
types   |                
        |              
        |                   Feather
        |                      HDF5
        |                         CSV
        +----------------------------->
             load data saved long ago
8 Likes

Then you use it just as a mean to save data on disk?

Yes. But, as you noted, there are other possible uses.

Deserialization is unreliable, if versions are incompatible. Was this only the case for major version differences (e.g. 1.x → 2.x) and minor version differences (e.g. 1.1 → 1.2), not for patches (e.g. 1.2.1 → 1.2.2)?