[CLJ-1044] Enable refering to ->type inside deftype Created: 18/Aug/12 Updated: 09/Aug/16
Inside a defrecord body it's possible to refer to ->type-ctor but that is not possible inside deftype.
This patch adds an implicit declare, as done in defrecord making it possible to use the ->type-ctor inside deftype methods
|Comment by Timothy Baldridge [ 03/Dec/12 11:29 AM ]|
Seems valid. Vetting.
|Comment by Sam Estep [ 09/Aug/16 10:34 AM ]|
Will this be incorporated soon? It's awkward to have to explicitly declare the factory function when defining, e.g., data structures (example). Also, the current situation violates the principle of least astonishment; while working through this tutorial, I was quite surprised to find that defrecord does implicitly declare the factory functions, which contradicted my prior experience with deftype.
|Comment by Alex Miller [ 09/Aug/16 7:34 PM ]|
No enhancements are considered critical so it's hard for me to say when this will get evaluated. I've bumped it one step down the process at least.
|Comment by Sam Estep [ 09/Aug/16 7:39 PM ]|
Thank you, Alex! I completely understand that this isn't a particularly important issue; nonetheless, it is encouraging to see it move closer to being fixed.