autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving AC development strength


From: Akim Demaille
Subject: Re: saving AC development strength
Date: 30 Jan 2002 14:20:27 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| > | 1.  changequote to something certain to not be confused (probably would
| > |     have been a really good idea way back when, but likely not now)

No, it has always been a bad idea.  It's just that noone was aware how
bad it was.  You're comparing a 

~/src/ace % wc -l /usr/share/autoconf2.13/*.m4                   nostromo 14:15
   2608 /usr/share/autoconf2.13/acgeneral.m4
     80 /usr/share/autoconf2.13/acoldnames.m4
   2763 /usr/share/autoconf2.13/acspecific.m4
     28 /usr/share/autoconf2.13/autoconf.m4
    110 /usr/share/autoconf2.13/autoheader.m4
   5589 total

with a

~/src/ace % wc -l lib/{autoconf,m4sugar}/*.m4                    nostromo 14:16
    117 lib/autoconf/autoconf.m4
    116 lib/autoconf/autoheader.m4
     86 lib/autoconf/autotest.m4
     98 lib/autoconf/autoupdate.m4
   1072 lib/autoconf/c.m4
    810 lib/autoconf/fortran.m4
   1637 lib/autoconf/functions.m4
   2453 lib/autoconf/general.m4
    619 lib/autoconf/headers.m4
    576 lib/autoconf/lang.m4
    486 lib/autoconf/libs.m4
    113 lib/autoconf/oldnames.m4
    465 lib/autoconf/programs.m4
    476 lib/autoconf/specific.m4
   1529 lib/autoconf/status.m4
    569 lib/autoconf/types.m4
    997 lib/m4sugar/m4sh.m4
   1796 lib/m4sugar/m4sugar.m4
      9 lib/m4sugar/version.m4
  14024 total

So yes, the problem is more visible now.




| Here's an example.  Please note that *only* user supplied
| text has the quadrigraph substitutions done. 

Then the user cannot pass text to expand to your tool.

| have control over, I don't do that.  Oh, I still have a question,
| too:  Given that I have complete control over the macro, I can
| test to see if a full language "push" is required by testing
| to see if it is the current language.  Is it worth doing?
| The alternative is to blindly push & pop.

Go for the latter.  You *never* know if you're right or not.  People
don't seem to understand how bad static vs dynamic is.  Study this:

if $foo; then
  AC_LANG_PUSH(C++)
  AC_FOO_PART_1
fi

AC_LANG_PUSH(C++)
AC_BAR
AC_LANG_POP

if $foo; then
  AC_FOO_PART_2
  AC_LANG_POP
fi


Never think you can optimize.  You just can't.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]