Ticket #2038 (new deprecation)

Opened 11 years ago

Last modified 11 years ago

Singleton PMCs are deprecated

Reported by: whiteknight Owned by:
Priority: trivial Milestone: 3.9
Component: core Version: master
Severity: medium Keywords: newbie
Cc: Language:
Patch status: Platform: all


Parrot shouldn't be responsible for implementing the singleton contract for PMCs. Our current implementation of it is very bad anyway.

If HLLs or other projects want singletons, they should be able to implement the behavior themselves.

Types such as Env and OS don't have state so don't need to be singletons. They are basically just collections of methods, and it's very cheap for us to just create multiple copies of them if needed.

The scheduler is a different story. It does have state, so we need to only have one of those in the system at a time. There are ways to prevent users from creating a scheduler from PIR code. The scheduler reference is available (or should be) by introspecting the current interp PMC.

Change History

Changed 11 years ago by gerd

  • milestone changed from 3.4 to 3.5

Changed 11 years ago by jkeenan

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