[Gllug] just a quick question

Daniel P. Berrange dan at berrange.com
Sat Feb 11 19:49:57 UTC 2006


On Sat, Feb 11, 2006 at 07:20:43PM +0000, Tethys wrote:
> 
> "Daniel P. Berrange" writes:
> 
> >m4 is
> >
> >  good for: inflicting pain
> >            obfuscating code
> >  bad for: maintainable programs
> >           ease of use
> 
> Not that I'm going to either agree or disagree with you, but I'm just
> curious as to what you'd suggest as an alternative macro language?

Its actually quite a tricky task because autoconf was designed to only
assume presence of a minimal shell & not require distribution of the
autoconf tools themselves. If you look at what the macros in autoconf
actally do, however, by far the large majority can be thought of as
simple function calls - not all that many actually require the recursive
'inlining' ability that a macro language like m4 gives you. So personally
I'd be inclined to simplify the way autoconf scripts were written to simply
have a single level of inlining - so you'd just have a library of lots of
regular shell script fragments, which just get concatenated together to
form the complete script. This would make some of the more advanced uses
of autoconf more work to write, but I think that extra work would be offset
by the be gains in doing the simple stuff.

Or I might just say, screw shell scripts - Perl is practically as 
omnipresent today as shell was 10 years back & thus use a real programming
language instead of trying to do nasty tricks in the shell.

> I know people that swear by ML/I, but I've never used it myself.
> 
> 	http://www.ml1.org.uk

Never tried it either. 

Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20060211/b55321dc/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list