Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion function and lambda, again
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Erik Naggum  
View profile  
 More options Mar 4 2002, 7:59 pm
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.net>
Date: Tue, 05 Mar 2002 00:59:42 GMT
Local: Mon, Mar 4 2002 7:59 pm
Subject: function and lambda, again
  This is a fairly useless suggestion, probably annoying, but there might
  also be some obcure, but very valuable history lesson hidden underneath
  this, so if you permit me the useless, annoying suggestion as a means to
  an end...

(lambda (argument-list) body)
(function function-name)

  Recall that a function-name is a symbol or a list.

  If lambda is an undesirable choice of name, function could assume both
  roles, as it is disambiguated by its required one argument and lambda
  needs a body.

  In the degenerate case of a lambda with no body, its arguments, if any,
  are unused and could need a declaration to that effect.  The empty
  argument-list is disambiguated from the function nil by the inability
  (or at least extremely poor taste) to name a function nil.

  In other words, here is the proposal: Replace lambda with function, and
  arrive at something like this:

(function (x) (mumble-frotz x))

  Now, I am not allowed to set up a macro for cl:function, but I can create
  my own package and do the following there:

(defmacro function (first &rest rest)
  (if rest
    `(cl:lambda ,first ,rest)
    `(cl:function first)))

  This macro could, if necesary, walk through the body and discovery free
  variables and make it possible to distinguish function and closure (a
  subclass of function), which would then have its own "constructor".

  I am actually more curious how "lambda" became the name of this operator
  and if something else has been proposed and rejected, and if, why.

///
--
  In a fight against something, the fight has value, victory has none.
  In a fight for something, the fight is a loss, victory merely relief.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.