Well, I don’t think the filename issue is very important, but I thought I’d ask.
I think that in a sense my application may be very different from many things people do in OCaml, e.g. most of the things listed e.g. in the “What are you hacking on this week” discussions. (I should post my case just to be an outlier.) I’m not creating a general-purpose tool for others, although at some point others might be interested. I’m doing scientific modeling. A lot of data is generated in one simulation experiment, and I want to be able to go back and examine parts of the data later after I look at overview results. utop is great data exploration tool. repls in general are good for that. I wouldn’t necessarily want to do all of the exploration in one utop session, though. Writing data out in an OCaml format is also a way to work around the difficulty in getting ocamlnet working with the libraries I need. I can run a native executable that generates data files, and then pull the data into utop to examine it.
Or I might want to write the data out to a generic format like csv later for use in another program, but there’s no need to generate large and inflexible csv files from the start. I’d rather read in the marshalled data and then write out csv’s as needed. I’d really rather not convert lists of matrices in and out of csv files or sexps or something else text-ey if in the cases where all I need is to store lists of matrices for later examination.
(I guess I’ve said similar things before, but it seemed relevant.)
I really love that it’s so easy to marshal data into files. This is a great feature. I understand that I have to be careful about type signatures when I read it in. I’m still exploring this idea, though. Maybe it’s not so easy. The point about small changes segfaulting seems worth worrying about, but at present it’s not clear to me that this could be an issue for me, as long as I haven’t changed the type I expect when I read the data back in. It might be that as I play with marshalling more, I’ll realize that there’s more danger than I think.