Re: languages again,was Re: [exim] relative 'expense' of Exi…

Top Page
Delete this message
Reply to this message
Author: Tony Finch
Date:  
To: Brian Candler
CC: exim-users
Subject: Re: languages again,was Re: [exim] relative 'expense' of Exiscan/SpamAssassin vs.local_scanfor simple header/body triggers?
On Mon, 19 Sep 2005, Brian Candler wrote:
>
> I don't think static type checking makes much sense in the context of
> string expansions, where everything is a string. However it might make
> sense if you were to handle things like domainlists and hostlists as
> native objects in this language.


Exactly. The aim would be to configure the software in a richly-typed
manner, which is safer than treating everything as a string and risking
syntax errors at run time.

> Perhaps before looking for a solution, it makes sense to at least think
> about where the problems lie. For me the biggest one is writing expressions
> nested more than 2 deep in the string expansion language.


May I recommend my style guide? :-) Section 6 of
http://www.cus.cam.ac.uk/~fanf2/hermes/doc/talks/2005-02-eximconf/
Though to be honest part of the guide is to avoid writing complicated
string expansions as much as possible - I only have one short instance of
a three-deep expansion in my configuration file. I've also improved things
recently, to use lookups in domain lists instead of string expansion
lookups in routers, which helps a lot. But then I'm not using LDAP :-)

Though any language which has support for user-defined functions would
solve this problem. Programming languages (other than Perl) also tend to
have a simpler and more regular lexical structure than Exim.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}