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

Re: Optimizers



I must agree that the best place to mention optimizers is right in
the function definition.

So what is the syntax going to be?  DEFUN is quite cluttered
enough as it is, what with &OPTIONAL, &REST, and that completely
awful-looking &AUX; (DEFUN (FOO BAR) ...) and (DEFUN (FOO BAR BAZ) ...);
declarations at the head of the body; and documentation strings at the
head of the body.  One can already in principle write things like:
	(DEFUN (FOO BAR BAZ) (A &OPTIONAL (B (HACK A)) &REST Z
			      &AUX EIGHTEEN-NUTTY-THINGS)
	       "This function is not documented because it is
		too ridiculous to explain."
	       (DECLARE (FIXNUM B))
	       (DECLARE (FLONUM A))
	       (DECLARE (SPECIAL Z))
	       (PRINT "HELP! The definition is down here somewhere!"))

Well, to make a bad situation worse, I observe that just as strings
as not-the-last-thing of a lambda-body aren't too useful, neither
are symbols -- so we can usurp that case as part of the DEFUN syntax
(*not* as part of the general DEFUN syntax).  So for the sake of
complete ridiculousness I propose that if the first thing after
the argument list is a symbol not at the end of the body, then
it and the next sexp form a property-value pair to be DEFPROP's;
and iterate.  So one might have:
	(DEFUN (FOO BAR BAZ) (A &OPTIONAL (B (HACK A)) &REST Z
			      &AUX EIGHTEEN-NUTTY-THINGS)
	       OPTIMIZERS (FOO-OPTIMIZER PUTPROP-OPTIMIZER GROSS-OPTIMIZER)
	       DOCUMENTATION "This function is not documented because it is
			      too ridiculous to explain."
	       COMMUTATIVE T
	       ASSOCIATIVE RIGHT
	       GRIND-FORMAT ((GLEEP) 4 %?<SNORT> ((GRUBBETZ) 4$) <SNEEZE>)
	       (DECLARE (FIXNUM B))
	       (DECLARE (FLONUM A))
	       (DECLARE (SPECIAL Z))
	       (PRINT "This definition hasn't a SNOBOL's chance of working!"))

So, **PLEASE**!

SOMEBODY, QUICK, THINK OF SOMETHING BETTER THAN THIS, BECAUSE THIS IS AWFUL!
--Quux