[Openmcl-devel] Naming anonymous functions

Gary Byers gb at clozure.com
Sun Mar 2 12:16:19 UTC 2014


On Sun, 2 Mar 2014, Anton Vodonosov wrote:

> CL-USER> (ccl::lfun-name (alexandria:named-lambda zu ()))
> ZU

Ron already explained that he wasn't asking how to create functions
with a specified name and was asking how to give names to functions
that were anonymous when they were created.  Gail explained how to do
what Ron asked about.  I assume that most interested parties get this
by now.

You're absolutely right (AFAICT) that ALEXANDRIA:NAMED-LAMBDA creates
functions with a specified name.  If someone has asked how to do this,
your answer would be both correct and useful.

If someone asks how warm it is outside and I say "according to my
watch, it's 4:14 AM", I've provided a correct answer to a question
that no one asked.   We're all guilty of doing things like this
from time to time; I don't know how to avoid that.

If it's pointed out that we're answering a question that wasn't asked,
we could either:

   1) Try to determine the current temperature or admit that we don't
      know that.
   2) Continue to insist that the time was 4:14 AM, or that
      ALEXANDRIA:NAMED-LAMBDA creates named functions.

I'm sure that we're all guilty of (2) as well, but we can do
something about this: the things that we can do include listening
more carefully and thinking more clearly.   Please do those things
as soon as possible so that this conversation can die an honorable
death and we won't have to watch it lurching around violently like
something from a bad zombie movie ...

[For the terminally curiousL: many, many years ago, there were 3 types
of functions in what eventually became CCL.  If I remember correctly:

   CFUNs were implemented in C
   SFUNs were interpreted functions
   LFUNs were implemented by code produced by that newfangled compiler thing

This is something like having 3 kinda of CONS cells.

It took a long time for the other two categories to disappear, but
LFUNs ("Lisp functions") survived.  This is relevant (to the extent
that it is) in that some code that remains in CCL refers to functions
as "lfuns", and there are still internal functions like
#'CCL::LFUN-NAME.]



More information about the Openmcl-devel mailing list