Re: Very poor Lisp performance
- From: Brian Downing <see-signature@xxxxxxxxx>
- Date: Fri, 19 Aug 2005 17:54:19 GMT
In article <m2iry1q2j6.fsf@xxxxxxxxxxxxxxx>,
Peter Seibel <peter@xxxxxxxxxxxxxxx> wrote:
> > Presumably that is a Lisp-specific problem because Mathematica has no
> > problem using infix notation...
>
> I'm not sure it's been established that Mathematica has macros that
> are similar in power to Lisp's macros. If you want to see what an
> honest attempt to combine infix operators with Lisp-style macros looks
> like you should check out Dylan or (more recently) the Java Syntactic
> Extender[1]. However to understand the comparison you'll, of course,
> have to learn something about Common Lisp macros. And if you really
> want to go to town, look into Scheme's various macro systems which
> offer a slightly different take on the problem.
To Mathematica's credit its syntax always boils down to it's own
funny-looking sexprs:
(2 + {3, 4, 5}) ~Frob~ x is really Frob[Plus[2, List[3, 4, 5]], x]
So given that you can programmatically manipulate Mathematica symbolic
expressions, it's probably not a stretch to say that in theory you can
generate arbitrary code like you can with CL macros.
The problem, as mentioned in another branch of the thread here, is that
the Mathematica syntax is incredibly complicated to support some of this
flexibility, and the Mathematica evaluator is so /incredibly/ complex as
to basically prohibit understanding of what's going to happen when
things are evaluated, at least for me. There's certainly no concept of
"macroexpansion time" and "run time" like there is in CL, and there's no
simple QUOTE operator - things keep evaluating until they stop changing
unless wrapped in special Hold forms that have to stick with it to keep
it from evaluating in the future.
-bcd
--
*** Brian Downing <bdowning at lavos dot net>
.
- Follow-Ups:
- Re: Very poor Lisp performance
- From: Jens Axel Søgaard
- Re: Very poor Lisp performance
- From: Jens Axel Søgaard
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- References:
- Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Ulrich Hobelmann
- Re: Very poor Lisp performance
- From: Jon Harrop
- Re: Very poor Lisp performance
- From: Peter Seibel
- Very poor Lisp performance
- Prev by Date: Re: Ray tracer in Stalin
- Next by Date: Re: ADA and my own business
- Previous by thread: Re: Very poor Lisp performance
- Next by thread: Re: Very poor Lisp performance
- Index(es):
Relevant Pages
|