Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Lisp macros

Name: Anonymous 2011-08-23 7:02

What makes them so great?

lol why cant u just use regular functions?

Name: Anonymous 2011-08-23 7:27

Because most Lisps don't have switch special forms, meaning you need to implement them yourself. You couldn't do it with a function, because a function forces the evaluation of all its arguments.

Name: Anonymous 2011-08-23 7:36

LISP Macros leverage core skillsets and world-class team synergy through read time expansion to provide clients worldwide with robust, scalable, modern turnkey implementations of flexible, personalized, cutting-edge Internet-enabled e-business application product suite e-solution architectures that accelerate response to customer and real-world market demands and reliably adapt to evolving technology needs, seamlessly and efficiently integrating and synchronizing with their existing legacy infrastructure, enhancing the e-readiness capabilities of their e-commerce production environments across the enterprise while giving them a critical competitive advantage and taking them to the next level.

Name: Anonymous 2011-08-23 7:39

>>2
But you can get that functionality by wrapping arguments in lambdas. As a bonus, since you have to be explicit about deviating from the eager evaluation strategy, your code needs less context to be understood.

Name: Anonymous 2011-08-23 7:43

>>4
Macros are have less runtime overhead.

Name: Anonymous 2011-08-23 7:44

>>4
That's called lazy evaluation but I think it's much less efficient than macros.

Name: Anonymous 2011-08-23 7:48

>>5,6
LISP
efficient

Name: Anonymous 2011-08-23 7:49

>>7

i lol'd

Name: Anonymous 2011-08-23 8:31

>>7
It can be, if you do it right.

Name: Anonymous 2011-08-23 9:21

>>2
Oh look, someone who never learned Lisp is talking about it.
don't have switch special formsWhy would Lisp even waste a special form on that? It has a lot of macros which have all the functionality that you'd want and more:
if cond case ecase ccase typecase etypecase ctypecase
And if those weren't enough (they come with CL), there are various more generalized macros in general purpose library (including a switch, although (e/c)(type)case is more than enough for most stuff).
>>1
Macros are a way to extend the compiler, they allow you to generate code at runtime. The main difference between macros in other languages and macros in Lisp is that you can run code which generates code at compile-time, the other difference is that all Lisp code "look" the same, so your new code doesn't look any different from code which only uses the language's symbols (if you want, you could even not use those(use packages to pick which symbols you want and from where) and make a completly new language). There are also reader macros which let you generate code at read time (lexing/parsing-time).

Name: Anonymous 2011-08-23 10:09

>>10
YHBT.

Don't change these.
Name: Email:
Entire Thread Thread List