Clojure

print-dup should not be defined for deftypes

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: Release 1.3
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

deftypes are supposed to be relatively 'clean'. Defining print-dup on them might conflict with their other intended uses - e.g. if you use a deftype and implement IPersistentSet you can't print due to this conflict.

Activity

Hide
Fogus added a comment -

Rich,

Removed print-method also.

print-dup was initially put in lieu of compiler support, its remaining was not intended. print-method was put to provide a prettier representation and I was not aware of the larger implications. Thank you for the ticket, I hope they didn't cause any annoyances.

Show
Fogus added a comment - Rich, Removed print-method also. print-dup was initially put in lieu of compiler support, its remaining was not intended. print-method was put to provide a prettier representation and I was not aware of the larger implications. Thank you for the ticket, I hope they didn't cause any annoyances.
Hide
Fogus added a comment - - edited

Ditto print-method.

Replaces the previous patch.

Show
Fogus added a comment - - edited Ditto print-method. Replaces the previous patch.
Hide
Rich Hickey added a comment -

Erm, ditto print-method.

Also, was this put in originally in order to support deftypes in code?

Show
Rich Hickey added a comment - Erm, ditto print-method. Also, was this put in originally in order to support deftypes in code?
Hide
Fogus added a comment -

Added patch to back out the deftype print-dup.

Show
Fogus added a comment - Added patch to back out the deftype print-dup.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: