wc-duck / datalibrary

Open Source Data Library for data serialization.
Other
42 stars 8 forks source link

dl_reflect.h has a bad interface. #47

Open wc-duck opened 8 years ago

wc-duck commented 8 years ago

The current reflection interface is far from good and should be redone. Today the interface forces the user to manage memory by them self when a simpler interface would work just as well.

Example:

dl_reflect_type( dl_ctx_t ctx, int type_index, dl_type_info* info );

wc-duck commented 5 years ago

@lundmark If I were to change this interface, how much would that break your code? And if it is much, would it be ok for you to re-implement the old interface in your code?

lundmark commented 5 years ago

Hmmm, it would probably break a bit. I'm not sure how much you want to re-do it or what you want to re-do it to. But I don't think that it would take more than an hour or two to fix up. It's not that much we use it tbh. We will use it more in the future though, so any refactoring should preferably be done sooner rather than later.

wc-duck commented 5 years ago

As far as I know now it would only be the changes mentioned above.

wc-duck commented 5 years ago

When looking at it it may be fine to just extend the interface.