discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: little ObjectiveC poll.


From: Richard Frith-Macdonald
Subject: Re: little ObjectiveC poll.
Date: Thu, 2 Feb 2006 06:16:06 +0000


On 2 Feb 2006, at 05:34, Sheldon Gill wrote:

Lloyd Dupont wrote:
I haven't really programmed in ObjectiveC since a long time now.
But I have to work with my boss's source, developed on MacOSX all in ObjectiveC. Something puzzles me and I wonder if it's normal in "ObjectiveC" (or C)..... (or if I'mjust unlucky ;-) His files are very long (most of them over a few 10 of thousands lines) and some methods are very long too (up to 1 to 2 or 3 thousands line. 1 thousands line is common, 3 is rare). Now I wonder, is it "common practice" in ObjectiveC, or is it just my boss?

I don't think its common practice in most programming languages.

One of the metrics used for program maintainability is length per function. Higher length, less maintainable.

Take a look at the whole refactoring movement and most "good programming practice" information out there. You'll see that shorter is generally better and preferred.

Yes ... it's a decent rule of thumb ... but of course it's always possible to make them *too* short, so that you make things more complex overall (lots of function/methods) and end up separating bits of code that flow well together, and make things inefficient by imposing lots of extra call overheads. I find this is a problem in the C++ coding culture.

Anyway, methods thousands of lines long seem *very* large to me, I would have thought that 1-200 lines was normal with most methods being in the 10-50 region (a liberal sprinkling of one line accessors keeping the average length down).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]