[Grace-core] [A Graceful Blog] Comment: "From Lancaster to Portland"
James Noble
kjx at ecs.vuw.ac.nz
Sat Sep 24 21:53:48 PDT 2011
> One way to think about branding is that each branded object, in addition to having its real methods, has an additional nullary method called #<gensym>#...
Yep - this would work, as would a simple convention about naming methods.
The catch with a magic name is - how would you write it when you wanted to match against it?
If you can write it elsewhere, it's "just a convention"; if not, then presumably you need access
to a pattern (or type) that will match the branded object / class instances --- which comes
down to making each class a nominal type, or at least deriving such a type from the class...
James
More information about the Grace-core
mailing list