Clojure

Allow pre and post-conditions in defprotocol and deftype macros

Details

  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    Dos not matter.

Description

The fn special form and the defn macro allow pre- and post-conditions. It would be nice if one could use that conditions also in method declarations of the defprotocol and deftype macro.

Currently I use the extend function as workaround where one can specify the methods using a map of keyword-name and fn special form.

Activity

Alex Miller made changes -
Field Original Value New Value
Labels deftype protocols

People

Vote (2)
Watch (5)

Dates

  • Created:
    Updated: