Box2D Forums

It is currently Tue May 21, 2013 10:43 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Dec 13, 2010 6:17 pm 
Offline

Joined: Mon Aug 16, 2010 11:09 am
Posts: 128
Hello,

I find it quite hard to quickly browse the source code to see what kind of classes it has and to see what it consists out of.

Especially with an external text editor like textpad.

I think it would probably be much better to split everything up.

Pretty much downto: one class per file.

The drawback would be "uses clausule" hell where everything has to be included.

Perhaps this can be solved by creating special types in one main unit like so:

unit Physics2D;

uses
everything here;

type
TSomething = unit.TSomething;

Perhaps something like that might work.

otherwise something like:

type
TB2Something = unit.TSomething;

At least this way the main unit can be included and have everything.

What you think of splitting the code up into multiple files ?

I think the main reason for one big file is because of "uses" problem... what if that problem was solved with method above...

Editing multiple files should also be pretty easy. So I dismiss arguments like: "editing multiple files is bad"

Editing multiple files actually always faster and more precise scrolling because source codes tend to be smaller.

Bye,
Skybuck.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group