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

*To*: SOLEY@xx.lcs.mit.edu, barmar@Think.COM*Subject*: New special form suggestion: LET-CONSTANT*From*: Guy Steele <gls@Think.COM>*Date*: Thu, 6 Aug 87 11:11 EDT*Cc*: common-lisp@sail.stanford.edu, gls@Think.COM*In-reply-to*: <SOLEY.12324332217.BABYL@XX.LCS.MIT.EDU>

Date: Thu, 6 Aug 1987 10:18 EDT From: SOLEY@xx.lcs.mit.edu Date: Monday, 3 August 1987 12:07-EDT From: Barry Margolin <barmar at Think.COM> ... It seems like a LET-CONSTANT special form, or an &CONSTANT lambda-list keyword, would be the right thing for this. LET-CONSTANT would be to DEFPARAMETER what FLET is to DEFUN, and &CONSTANT would be analogous to &AUX. Yeah, and how about an &LOGOUT lambda-list keyword, to log out the current process? Really, although I understand the trivial difference in scope between LET and &AUX, do we need to continue adding random lambda-list keywords, which (worse yet) aren't keywords at all? Oh, wow! I don't mean to make fun of anyone, but you just gave me a great idea for eliminating LOOP by folding it into LAMBDA. (JONL, are you listening? That old idea resurfaces in new syntax.) (defun factorial (n &for j &from 1 &to n &for a &= 1 &then (* a j) &finally (return a))) A great feature of this is that it defuses the old quibble of whether or not LOOP "keywords" should be :-keywords by making them be &-keywords. We can get declarations in this way, too. (defun factorial (n &integer n &for j &from 1 &to n &for a &= 1 &then (* a j) &integer j a &finally (return a))) Also, let's do for English as for Lisp and replace documentation strings. What's sauce for the goose is sauce for the gander. (defun factorial (n &integer n &for j &from 1 &to n &for a &= 1 &then (* a j) &integer j a &finally (return a)) &documentation &factorial &takes &a &nonnegative &integer &n &and &returns &the &product &of &all &positive &integers ¬ &greater &than &n &.) &Maybe &I &could &get &to &like &this &language &after &all &. --Quux

**References**:**New special form suggestion: LET-CONSTANT***From:*SOLEY@XX.LCS.MIT.EDU

- Prev by Date:
**New special form suggestion: LET-CONSTANT** - Next by Date:
**truename, merge-pathnames, etc.** - Previous by thread:
**New special form suggestion: LET-CONSTANT** - Next by thread:
**Question on function type spec and lambda-list keywords** - Index(es):