Clojure

ns defmacro allows arbitrary execution of clojure.core fns

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.2, Release 1.3, Release 1.4
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    all
  • Patch:
    Code

Description

The form:

(ns foo (:print "I AM A ROBOT"))

will print "I AM A ROBOT"

This is because the defmacro takes the name of the first element of the reference, looks it up in the clojure.core namespace and invokes it on the rest of the args.

This is minor, but it does mean that an otherwise declarative form is not executing code.

Activity

Craig Brozefsky made changes -
Field Original Value New Value
Attachment ns-patch.diff [ 11395 ]
Craig Brozefsky made changes -
Attachment ns-patch.diff [ 11412 ]

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated: