Ticket #2042 (new deprecation)

Opened 11 years ago

Last modified 11 years ago

Deprecate VTABLE_can

Reported by: whiteknight Owned by: cotto
Priority: normal Milestone: 3.9
Component: core Version: 3.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

VTABLE_can is defined in two places: object.pmc and default.pmc. In both cases, it performs exactly this operation:

return !PMC_IS_NULL(VTABLE_find_method(interp, self, name));

Also, VTABLE_can is not able (yet) to be overridden from PIR code, which means that the vast majority of classes written by users will always have this same exact default behavior.

I suggest we deprecate and remove VTABLE_can. The "can" PIR op can remain, but should call VTABLE_find_method directly.

Change History

Changed 11 years ago by cotto

We currently have ops for find_method and can, and VTABLE slots for find_method and can. I'd be amenable to having only a find_method op, but we also have to consider how this would affect users. If the burden on Rakudo and Partcl (and anyone else using these ops/VTABLE slots) isn't too bad, let's put the VTABLE slots and the "can" op through a deprecation cycle.

Changed 11 years ago by jkeenan

  • milestone changed from 3.6 to 3.9
Note: See TracTickets for help on using tickets.