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

Re: implicit linkage



On Sun, 12 Oct 2014 19:02:08 +0100
Martin Read <zen75502@zen.co.uk> wrote:

> On 12/10/14 18:13, John Hasler wrote:
> > Martin Read writes:
> >> I'm not seeing a serious problem with that function.
> >
> > You have no problem with an 1800 line function?
> 
> The thing that you are asking me if it is the case is not the thing I
> said.
> 
> I have a problem with 1800 line functions in general; they're clearly 
> undesirably long. I don't have a *serious* problem with 1800-line 
> functions *in general*, though they're certainly on my list of things 
> that should be refactored.
> 
> Moving on to the specific case, I don't have a *serious* problem with 
> that particular 1800-line function. It certainly merits refactoring
> (I can even see an obvious starting point for doing so), but it's not 
> unreadable or hard to follow; it's just inconveniently long.
> 
> But while we're on the topic of things I have a problem with, here's 
> one: people choosing to interpret "I'm not seeing a serious problem
> with that function" as "I have no problem with that function" :)

I have no problem with an 1800 line function. Personally, I wouldn't
write one, and I'd hate to maintain one, but how many lines the guy
puts in his function is no business of mine. What I *DO* have a problem
with is the guy's welding pam onto his new init, and welding other
critical and former separate OS functionalities onto his "toolset",
preventing (either technically or by them being removed from the
packages) former modules from being used.

From my perspective, a toolset is a set of tools you can use singly,
in combination, and *in combination with other tools*.

If I were to maintain his code, before reducing the 1800 line
function, I'd do something about the function with 20 arguments, with
each argument including a function call. I'd replace all of that with
a struct pointer. 

But then again, as a user, his implementation is none of my business,
whereas his overall architecture is *certainly* my business, especially
if it constrains my abilities to maintain/modify my system. 

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance


Reply to: