2 ms·
> I really despise the 'common' module approach because it scatters code that should be in the same file. If you have circular dependencies then, in my opinion
by beagle3 6y ago
> I really despise the 'common' module approach because it scatters code that should be in the same file.
If you have circular dependencies then, in my opinion and experience, it unifies code that should be in the same file, and which was wrongly scattered among different ones.
I remember reading the release notes on Turbo Pascal 6 (or was it 5? or Borland Pascal 7) with a weird half-assed support for circular type dependencies among different units, and trying to find a case where putting all the definitions in one file (and avoiding all these issues) wouldn't make more sense to me. It's been 30 years since, and I haven't seen an example as such yet.
I acknowledge there's no accounting for taste, of course.