|
![](/i/fill.gif) |
Florian Brucker <tor### [at] torfbold com> wrote:
> There *are* situations when using a macro is not the best solution. I
> regularly have include files which depend on a *lot* (i.e. 50+)
> parameters - you don't want to pass all these everytime you call a
> macro.
good point. It is indeed much cleaner than calling a 50+ parameters macro.
OTOH, is there real need for a single file with 50+ parameters? Must the
user actually set all of those any time they call the include?
If they are needed, then it's not much better than a 50+ parameter macro
call, except parameters are named.
If most are not needed to be set at any one time, i guess your include file
is lacking functional cohesion, that is, it could probably be better
decoupled into several highly cohesive smaller include files with far less
parameters each and which are logically connected by subject. If such, you
could consider instead just a single include file with several separate
macros with their own parameters.
Anyway, given what Warp just slipped, it doesn't matter much anyway. But
i'd still go for macros, since the interface can remain the same once we
get a truly good macro implementation for the 4.0 rewrite...
Post a reply to this message
|
![](/i/fill.gif) |