how do you manage types? General question lazarus / 21-General ---------------------------------------------------------------------- Weiss · 2023-11-20 20:52 Lately I ran into a problem while re-using my own code from other projects. Same type declarations for same things scattered through multiple back-end unit. Obviously I do not have a very large vocabulary or imagination. What would be a strategy getting out of the mess and keeping things neat? This is a very general question, I am not looking for actual implementation. Should I build a type stockpile unit of some sort, and drag it along to every new project? Or would it be better to combine multiple units into one? Perhaps naming convention of some sort, I am open to any ideas. Please share your thoughts. ---------------------------------------------------------------------- jamie · 2023-11-20 22:38 depends.  Use for all, WISxxxxx  use for a specific project, "ProjectInitials.xxxxxxxx" ---------------------------------------------------------------------- Joanna · 2023-11-21 00:19 Put all your reusable types in one unit and use unit when needed ---------------------------------------------------------------------- Weiss · 2023-11-21 15:31 thank you Joanne, I did. Works beautifully, no conflicting types anymore, this will be my schtick. Jamie, you have a way of sending me to a long and painful learning loops. I usually enjoy it, but this time I can't find what is WISxxx or projectInitials.xxx. Can you please (gently!) nudge me to where I can find what you mean? ---------------------------------------------------------------------- cdbc · 2023-11-21 17:54 Hi I think Jamie is talking about naming-convention... You should define one of your own, either by using namespaces or by prepending yours or project initials, eg: weiss.utilities.pas or wei_utilities.pas Anyway, that's what I do, in addition I've modelled my directory structure somewhat after the rtl... HTH Regards Benny