Philip Hazel wrote:

>> I just looked through expand.c and saw that expand_string_internal grew 
>> a lot over the last 2 years. Currently it's 2359 lines long, expand.c is 
>> 5442 lines in total .... ;)
> 
> Yes, well, people keep on adding things. :-)

I noticed .... I was following the list whenever I had some time, and 
some people have VERY strange wishes. (No names here *G*)

>> What do others think about refactoring it a bit? Some larger chunks 
>> could be placed in subroutines, maybe all functionality should be 
>> factored out into single subroutines, called via a mapping-tables 
>> indexed by the expansion-type.
> 
> You'd lose some performance, of course, but how much that would affect 
> the overall performance of Exim I would not like to guess.

I don't think so, because it wouldn't differ very much from the way gcc 
handles the switch/case statement. Also it would give the opportunity to 
look at some code again and maybe tweak it a little bit.

I'm just not a fan of such big functions, because you loose a lot of 
readability (IMHO).

Nico

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details 
at http://www.exim.org/ ##

Reply via email to