<< Back to previous view

[CLJ-812] print-dup should not be defined for deftypes Created: 20/Jun/11  Updated: 29/Jul/11  Resolved: 29/Jul/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.3
Fix Version/s: Release 1.3

Type: Defect Priority: Major
Reporter: Rich Hickey Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: File CLJ-812-print-dup-no-deftype.diff     File CLJ-812-print-dup-no-deftype.diff    
Patch: Code and Test
Approval: Ok


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.

Comment by Fogus [ 20/Jun/11 11:55 AM ]

Added patch to back out the deftype print-dup.

Comment by Rich Hickey [ 20/Jun/11 12:12 PM ]

Erm, ditto print-method.

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

Comment by Fogus [ 20/Jun/11 1:12 PM ]

Ditto print-method.

Replaces the previous patch.

Comment by Fogus [ 20/Jun/11 1:16 PM ]


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.

Generated at Mon Sep 25 21:02:02 CDT 2017 using JIRA 4.4#649-r158309.