Clojure

Implement an interface? predicate to balance class?

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Declined
  • Affects Version/s: Release 1.5
  • Fix Version/s: None
  • Component/s: None
  • Environment:
    Any
  • Patch:
    Code and Test

Description

clojure.core implements a class? predicate to detect if a thing is an instance of java.lang.Class. The attached patch implements interface? to further distinguish classes that are also interfaces. This gives us Clojure api for e.g., enumerating all interfaces a thing's base class implements; as in, (filter #(interface? %) (supers (class my-thing))).

Activity

Hide
Stuart Halloway added a comment -

I would prefer to see this, and other interop/reflective items, in a separate contrib lib.

Show
Stuart Halloway added a comment - I would prefer to see this, and other interop/reflective items, in a separate contrib lib.
Stuart Halloway made changes -
Field Original Value New Value
Resolution Declined [ 2 ]
Status Open [ 1 ] Closed [ 6 ]
Hide
David Rupp added a comment -

Thanks for the feedback, Stu. Is there an existing contrib lib for stuff like this? Or should I create one?

Show
David Rupp added a comment - Thanks for the feedback, Stu. Is there an existing contrib lib for stuff like this? Or should I create one?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: