#2038: Singleton PMCs are deprecated
-------------------------+--------------------------------------------------
Reporter: whiteknight | Owner:
Type: deprecation | Status: new
Priority: trivial | Milestone: 3.4
Component: core | Version: master
Severity: medium | Keywords: newbie
Lang: | Patch:
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.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/2038>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets