#1895: [DEPRECATED] difference between :load and :init Sub flags
-------------------------+--------------------------------------------------
Reporter: plobsing | Owner:
Type: deprecation | Status: new
Priority: normal | Milestone: 2.11
Component: none | Version: 2.10.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
-------------------------+--------------------------------------------------
Comment(by pmichaud):
> This distinction is meaningless and results in many subs being
> flagged :init :load, as well as unecessary complexity in the
implementaiton.
Completely wrong about the distinction being "unnecessary". The important
distinction is that subs marked :init are invoked when the module (.pir or
.pbc) is run as the main program from the Parrot command line, while subs
marked :load are invoked when loaded from a running Parrot program (e.g.,
via load_bytecode) but not when invoked from the command line.
Rakudo (and most other PCT-based tools) absolutely make use of this
distinction. There are some initializations that should only take place
if a module is being invoked from the command line, and there are others
that should only take place if a module is being loaded from a running
Parrot program. Indeed, at one time we only had a :load flag, and :init
was introduced because :load couldn't handle all of the important
distinctions on its own.
Please don't take a horrible step backwards on this point. If anything,
Parrot needs *more* distinctions between the different times of
initializations that can occur, not less.
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1895#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets