[PATCH] add a new unlzma applet

Rob Landley rob at landley.net
Wed Jan 18 15:36:07 UTC 2006


On Wednesday 18 January 2006 02:57, Roberto A. Foglietta wrote:
> Rob Landley ha scritto:
> >>>And
> >>>rc_free() there's just no excuse for, it's just a wrapper around free()
> >>>that's only called once
> >>
> >>I somewhat disagree about this. On a purely technical POV, you're right.
> >>But at a higher "algorithmic" level, this rc_free() allow a total
> >>abstraction of the rangecoder.
> >
> > Meaning what?
>
>   I think he would say: tomorrow if you want change algorithms the
> rc_functions changes inside but their API still the same. Is it right?

I got that, I'm just wondering what the advantage is.  Do we want to change 
algorithms?

Busybox is a slightly weird environment in that we're trying for small and 
simple more than most, and sometimes unwrapping this kind of abstraction lets 
you simplify (and thus shrink) this specific implementation of the code.  
(Admittedly not always.)

I'm not saying this isn't good clean code, I'm just thinking it might be 
possible to simplify it, and if so what the down side of simplifying it is.  
Does the abstraction layer make the code smaller, or make it easier to 
understand what it's doing?  Or is this preparation for future changes we 
don't actually plan to make, and which would be only slightly more difficult 
without these preparations?  (You can always refactor code to prepare for 
what you're about to do with it...)

Rob
-- 
Steve Ballmer: Innovation!  Inigo Montoya: You keep using that word.
I do not think it means what you think it means.



More information about the busybox mailing list