Closed sunipkm closed 2 months ago
The only issue I see with 1 or 2 is that it’s going to be API breaking, which is something I wanted to avoid. I do agree that my implementation is very C-like. I do like the idea of a generic trait, that’s more Rust-like. I will give this a bit more thought.
I agree that we should be able to read the comments as well.
Will you ever consider a pure Rust implementation of FITSIO?
The only issue I see with 1 or 2 is that it’s going to be API breaking, which is something I wanted to avoid. I do agree that my implementation is very C-like. I do like the idea of a generic trait, that’s more Rust-like. I will give this a bit more thought.
I will have a bit of an experiment as well and get back to you.
I agree that we should be able to read the comments as well.
👍
Will you ever consider a pure Rust implementation of FITSIO?
I think there are a few already, e.g. https://github.com/cds-astro/fitsrs, https://docs.rs/fits-rs/latest/fits_rs/, https://github.com/malikolivier/fitrs. I also had the thought myself, as the file format has a reasonable spec, however never got particularly far with the implementation.
I've drafted my new API design in https://github.com/simonrw/rust-fitsio/pull/332, let me know what you think. Particularly the updates to the full example, which show how to use this new API.
Thanks for this contribution, but as discussed We are going with the implementation from #332
I have added a function
write_key_cmt
to allow the addition of comments along with the key.