all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: Are there any problems with lexical-let or other cl-macros???
Date: Wed, 02 Jun 2010 13:26:56 +0200	[thread overview]
Message-ID: <lzpr09ptdr.fsf@informatimago.com> (raw)
In-Reply-To: m28w6yhgal.fsf@gmail.com

Helmut Eller <eller.helmut@gmail.com> writes:

> * LanX [2010-06-01 17:58+0200] writes:
>
>> (please correct me if I don't get it right in my words)
>>
>> So defmacro is restricted to defining macros with "function syntax" -
>> ie "(macro ...)" -  while reader macros could be triggered by any
>> character, opening the possibility to even extend the syntax to have
>> special markup for different data structures?
>
> Yes right.  defmacro defines a transformation from s-exps to s-exps.  A
> reader macro reads text from a stream and returns an s-exp.
>
>> Interesting... :)
>
> Reader macros have been used to write inline XML, SQL, and of course
> Python or C like syntaxes, but the problem is that the editor (usually
> Emacs) doesn't know how to indent reader macros.  Also the read table
> (the data structure which controls the reader) must be set up properly
> before compiling; that complicates the build process and interaction
> with other tools like the debugger.  It's sometimes useful to parse data
> files, but I never use reader macros in source files.

That's just because your source programs have always dealt only with
standard lisp objects.

If you started to  write a lisp program that would have  to deal a lot
with higher-level  data types (ie.  problem oriented data  types), and
you'd  need  to write  often  literals of  that  type,  you would  use
profitably reader macros then.

-- 
__Pascal Bourguignon__
http://www.informatimago.com


  reply	other threads:[~2010-06-02 11:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-01 13:01 Are there any problems with lexical-let or other cl-macros??? LanX
2010-06-01 13:18 ` Pascal J. Bourguignon
2010-06-01 14:20   ` LanX
2010-06-01 15:45     ` Helmut Eller
2010-06-01 15:58       ` LanX
2010-06-01 16:24         ` Helmut Eller
2010-06-02 11:26           ` Pascal J. Bourguignon [this message]
2010-07-15  0:13 ` Elena
2010-07-19 22:44   ` Stefan Monnier
2010-07-20  7:56     ` Elena

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lzpr09ptdr.fsf@informatimago.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.