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 -

Added patch to back out the deftype print-dup.

Show
Fogus added a comment - Added patch to back out the deftype print-dup.
Fogus made changes -
Field Original Value New Value
Attachment CLJ-812-print-dup-no-deftype.diff [ 10260 ]
Fogus made changes -
Approval Test
Patch Code and Test
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 - - edited

Ditto print-method.

Replaces the previous patch.

Show
Fogus added a comment - - edited Ditto print-method. Replaces the previous patch.
Fogus made changes -
Attachment CLJ-812-print-dup-no-deftype.diff [ 10261 ]
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.
Aaron Bedra made changes -
Approval Test Screened
Rich Hickey made changes -
Approval Screened Ok
Stuart Halloway made changes -
Status Open [ 1 ] Closed [ 6 ]
Resolution Completed [ 1 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: