In .NET you could use class fragments. .NET (including Prism - the new Delphi for .NET) you can create "bits' of a class in separate files.
This facility was afaik originally created to fix a shortcoming in .NET which was the lack of separate resource files to store form designs (i.e. no DFM's). Form designs were expressed as procedural code to construct the form object controls etc, and thus required an IDE/tool maintained section to be embedded in your application source code. Class parts were designed to overcome this, allowing the IDE/tool to maintain the form designer "code" separately from your "real" code. This of course has since been superceded by XAML etc. Once the genie was out of the bottle, you could of course abuse this to create the maintenance headache and productivity nightmare that you envisage. Or you could, as you suggest, use include files to induce the same nightmare. Ask your team mates about working with source files split across include file fragments if you don't believe that splitting files in this way is "A Very Bad Idea" (tm). Really, you will create more problems than you will ever solve with such an approach. That is, until the language is invented where this sort of source organisation is intrinsic in the language design. The "bubble" source model recently demonstrated in Eclipse is a step towards what you have in mind, and as a general principle the idea has some merit, but as I say, whilst a language (it's syntax, compiler and tools etc) is oriented around complete classes contained entirely within a single source file, you really are better off learning the best way to live with that model rather than trying to bash a square peg into a round hole. From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of Leigh Wanstead Sent: Monday, 5 July 2010 15:50 To: NZ Borland Developers Group - Delphi List Subject: [DUG] unit source code size Good afternoon, I am facing a trouble. Some of the class I wrote reaches more than 1600 lines. I don't like it. The methods in the class are ordinary range from one line to 200 lines. I really like each method sitting in their own unit. Just like abap in sap. It is easy to maintain 200 lines in a source code unit than 2000 lines. Without using include, what can I do? BTW, I don't understand why classes.pas in Delphi contain 11103 lines? Just to save Delphi programmer less uses clause? TIA Regards Leigh
_______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe