Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 1
    Yeah, gotta love eval. "Hey, look at me! I don't need to write my own security holes; I've got an arbitrary code execution vulnerability built right into the programming language!" Conflating data with code is the root cause of one of the two most popular classes of security vulnerabilities of all time. Anytime you see someone get hacked because of a SQL injection attack (among many other things) it's because some programmer out there doesn't know how to properly separate data from code. Commented Jan 12, 2012 at 13:50
  • eval does not depend on Lisp's structure very much--you can have eval in languages like JavaScript and Python. The real power comes in writing macros, which are basically programs that act on programs like data and output other programs. This makes the language very flexible and creating powerful abstractions easy. Commented Jan 12, 2012 at 23:23
  • 4
    Yes, I've heard the "macros are awesome" talk many times before. But I've never seen an actual example of a Lisp macro doing something that 1) is practical and something you would actually care to do in real-world code and 2) cannot be accomplished just as easily in any language that supports functions. Commented Jan 12, 2012 at 23:34
  • 2
    @MasonWheeler short-circuiting and. short-circuiting or. let. let-rec. cond. defn. None of these can be implemented with functions in applicative order languages. for (list comprehensions). dotimes. doto. Commented Jan 30, 2013 at 21:31
  • 2
    @MattFenwick: OK, I really should have added a third point to my two above: 3) is not already built-in to any sane programming language. Because that's the only truly useful macro examples I ever see, and when you say "Hey look at me, my language is so flexible that I can implement my own short-circuit and!" I hear, "hey look at me, my language is so crippled that it doesn't even come with a short-circuiting and and I have to reinvent the wheel for everything!" Commented Jan 30, 2013 at 21:52