🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6814

Re: Q Design Goals

#6814
From: lawrence.g.mayka
Date: Sat, 24 Feb 1990 04:46
46 lines
2562 bytes
In article <111966@ti-csl.csc.ti.com> gateley@m2.csc.ti.com (John Gateley) writes:
>In article <24995:06:42:28@stealth.acf.nyu.edu> brnstnd@stealth.acf.nyu.edu (Dan Bernstein) writes:
><Extensibility: Compilers can add any kind of feature (new types, new
><operations, new control sequences, whatever) to Q without kludging too
><hard. (Kludging is a verb? Oh, well.) In other words, Q recognizes the
><existence of extensions and provides standard ways to introduce them.
>
>This problem is either already solved (see Common Lisp macros and
>type system), or is very challenging (read impossible). CL is easily
>extensible through its use of macros. However, writing a new construct
>which is EFFICIENTLY integrated with the existing language is difficult.
>For most new constructs, there are many optimizations which can only
>easily be applied if you see the original constructs. With macros,
>they are translated into CL before the compiler sees them, thus the
>optimizations can't be performed. This is an interesting problem
>to attack.

ANSI Common Lisp indeed attacks the problem of optimizing new
constructs via *compiler macros.* These are macros applicable only
during compilation.  A compiler macro may have the same name as a
function.  Indeed, that is (apparently) its intended role: to
optimize at compile time what would otherwise be an ordinary
function call.  A compiler macro, like any macro, has access to
its original, unevaluated, unexpanded, source-code arguments and
can perform "smart" optimizations (or other transformations) on
them as desired.  ANSI Common Lisp also defines constructs for:

- Obtaining information (about variables, functions, and
declarations) from a lexical environment.

- Augmenting a lexical environment with additional such
information.

- Enclosing a function in an environment.

- Defining a handler for a declaration.

I don't know of any specific language extensions designed using
all these facilities yet, though.


	Lawrence G. Mayka
	AT&T Bell Laboratories
	lgm@ihlpf.att.com

Standard disclaimer.
Technical Details
Message-ID: <13896@cbnewsc.ATT.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!ames!pacbell!att!cbnewsc!lgm
References: <111966@ti-csl.csc.ti.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!brutus.cs.uiuc.edu!jarthur!elroy.jpl.nasa.gov!ames!pacbell!att!cbnewsc!lgm
From: lgm@cbnewsc.ATT.COM (lawrence.g.mayka)
Newsgroups: comp.lang.misc
Subject: Re: Q Design Goals
Message-ID: <13896@cbnewsc.ATT.COM>
Date: 24 Feb 90 04:46:49 GMT
References: <111966@ti-csl.csc.ti.com>
Reply-To: lgm@cbnewsc.ATT.COM (lawrence.g.mayka,ihp,)
Organization: AT&T Bell Laboratories
Lines: 46