Lähettäjä: Michael Haardt Päiväys: Vastaanottaja: exim-dev Aihe: Re: [exim-dev] Multiline macros or abstract objects?
On Fri, Sep 16, 2005 at 09:44:19AM +0100, Philip Hazel wrote: > On Thu, 15 Sep 2005, Michael Haardt wrote:
>
> > The specification may be the hardest point, but the actual code does
> > not sound too bad. Make "driver = appendfile" the same as "extends
> > appendfile", and the configuration stays compatible. Still Exim 4. :-)
>
> It is still too big an item for me at this time. I am not an OO
> programmer, for a start.
I am neither, although I did use Java for a large project in 1997/1998,
which was a pleasurable experience. Too bad it is not for system
programming.
As I said, the hardest work would be to specify the desired behaviour
first. I was curious if anybody would call me crazy for suggesting OO
instead of textual macros, and surprisingly, nobody did.
I am not suggesting to jump and hack Exim right now. I thought some
about multiple inheritance for Exim's objects, but have not yet come
to a conclusion how exactly it should work to be most useful. As a
matter of fact, this is not limited to Exim. Quite some software uses
"objects" in configuration files in a similar way Exim does and I do
see the same problem as addressed by the multiline patch there, too.
If things get too bad, I use m4, because there is no need to reinvent a
macro processor for every piece of software. Somehow I feel there must
be an OO extension that feels natural is 100% backward compatible.
I shall write more about this, if I can come up with a clear concept
how things should work and why. I am sick of macros, but don't hold
your breath.