From: Rahul
Subject: macro in other languages
Date: 
Message-ID: <1113852323.418948.123410@l41g2000cwc.googlegroups.com>
Does anybody know whether any other language supports macros except
Lisp and Scheme ?

From: Eric Lavigne
Subject: Re: macro in other languages
Date: 
Message-ID: <1113861656.476951.92840@f14g2000cwb.googlegroups.com>
>Does anybody know whether any other language supports
>macros except Lisp and Scheme ?

I think Perl programmers call them "source filters." They tend not to
work as well in Perl, though, because macros depend on uniform syntax
(which Lisp has and Perl doesn't). Also, I don't really know enough
about Perl source filters to say if they are on the same level as Lisp
macros.  

http://www.theperlreview.com/Interviews/mjd-hop-20050407.html
From: Christopher C. Stacy
Subject: Re: macro in other languages
Date: 
Message-ID: <uhdi3g9uh.fsf@news.dtpq.com>
"Rahul" <··········@gmail.com> writes:

> Does anybody know whether any other language supports
> macros except Lisp and Scheme ?

No, nobody knows.
From: Fernando Rodriguez
Subject: Re: macro in other languages
Date: 
Message-ID: <s5a861humqkurk8q8ej75n327uahu87grb@4ax.com>
On 18 Apr 2005 12:25:23 -0700, "Rahul" <··········@gmail.com> wrote:

>Does anybody know whether any other language supports macros except
>Lisp and Scheme ?

Apparently Dylan (with an infix syntax) does. See  Jonathan Bachrach's
work on "Dylan Procedural Macros". 
http://people.csail.mit.edu/people/jrb/jrb.html
From: M Jared Finder
Subject: Re: macro in other languages
Date: 
Message-ID: <T5CdncNZC8NSDfnfRVn-gA@speakeasy.net>
Fernando Rodriguez wrote:
> On 18 Apr 2005 12:25:23 -0700, "Rahul" <··········@gmail.com> wrote:
> 
> 
>>Does anybody know whether any other language supports macros except
>>Lisp and Scheme ?
> 
> 
> Apparently Dylan (with an infix syntax) does. See  Jonathan Bachrach's
> work on "Dylan Procedural Macros". 
> http://people.csail.mit.edu/people/jrb/jrb.html

Dylan was designed to be a Lisp with an infix syntax, so using that as 
an example is cheating.

There are plenty of non-Lisp languages with macros, but none of them 
have macros that are as simple to understand while still being as 
powerful as Common Lisp's.  For example, C++ has two macro systems -- 
the C preprocessor and templates.  CPP is simple, but can only do string 
munging, while templates are as powerful as Lisp macros, but have the 
most convoluted design I've ever seen.  What makes Lisp unique is not 
that it has macros, it's that it has GOOD macros.

   -- MJF
From: Jens Axel Søgaard
Subject: Re: macro in other languages
Date: 
Message-ID: <42643f80$0$246$edfadb0f@dread12.news.tele.dk>
Rahul wrote:

> Does anybody know whether any other language supports macros except
> Lisp and Scheme ?

"Growing Languages with Metamorphic Syntax Macros"
Claus Brabrand and Michael Schwartzbach; PEPM'02 (2002)
<http://www.brics.dk/bigwig/publications/macro.pdf>

-- 
Jens Axel Søgaard
From: Sebastian Stern
Subject: Re: macro in other languages
Date: 
Message-ID: <42653ef1$0$35992$dbd4b001@news.wanadoo.nl>
Rahul:
| Does anybody know whether any other language supports macros
| except Lisp and Scheme ?

Mathematica, somewhat.

--
Sebastian Stern

Freedom is the freedom to say (= (+ 2 2) 4).  If that is granted, all else
follows.
From: Ralph Richard Cook
Subject: Re: macro in other languages
Date: 
Message-ID: <4267c542.2656069@newsgroups.bellsouth.net>
OCaml (http://caml.inria.fr/index.en.html) has camlp4, "a
Pre-Processor-Pretty-Printer for Objective Caml. It offers tools for
syntax (grammars) and the ability to modify the concrete syntax of the
language (quotations, syntax extensions)."

Nemerle (http://www.nemerle.org) has macros.
"You can think about macros as of a system of compile-time
transformations and automatic generation of code with regard to some
rules. It can be used either to automate manipulations performed on
similar data-types and fragments of code or to add syntax shortcuts to
the language, optimize and make some computations safer by moving them
from runtime to compile-time.

The idea of making simple inline operations on the code comes from
preprocessor macros, which many languages (especially C, C++) have
contained since early times of compiler design. We are following them
in the direction of much more powerful, and at the same time more
secure (type-safe) solutions like Haskell Template Meta-programming. "

Io (http://www.iolanguage.com) claims 
"Io is small prototype-based programming language. The ideas in Io are
mostly inspired by Smalltalk (all values are objects), Self,
NewtonScript and Act1 (prototype-based differential inheritance,
actors and futures for concurrency), LISP (code is a runtime
inspectable/modifiable tree) and Lua (small, embeddable)."

Not sure if the "runtime inspectable/modifiable tree" qualifies as
macros, I've looked but never seen an example of this modification.

On 18 Apr 2005 12:25:23 -0700, you wrote:

>Does anybody know whether any other language supports macros except
>Lisp and Scheme ?


"Rahul" <··········@gmail.com> wrote:

>Does anybody know whether any other language supports macros except
>Lisp and Scheme ?