Clojure

Public Java API

Details

  • Type: Enhancement Enhancement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.6
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

Problem: Java consumers need an API into Clojure that does not drag in a ton of concrete implementation detail.

Solution: Very small API class that allows looking up Vars (returning IFn), and reading data (as edn). Uses Clojure logic where possible, e.g. Var.intern.

Current patch: CLJ-1188-via-var-intern.patch

Also considered:

  • wrapper class (inconvenient for users, wrappers anathema in Clojure)
  • common superinterface for IFn and Deref (unnecessary, might bloat vtable)

See also http://dev.clojure.org/display/design/Improvements+to+interop+from+Java

  1. CLJ-1188.patch
    30/Mar/13 8:40 AM
    7 kB
    Stuart Halloway
  2. CLJ-1188-via-var-intern.patch
    12/Apr/13 11:51 AM
    7 kB
    Stuart Halloway
  3. CLJ-1188-wrapper-free.patch
    03/Apr/13 6:53 AM
    6 kB
    Stuart Halloway

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: