Ticket #876 (closed RFC: fixed)

Opened 12 years ago

Last modified 12 years ago

Deprecate pushaction, pushmark, popmark

Reported by: whiteknight Owned by: coke
Priority: normal Milestone: 2.4
Component: none Version: 1.4.0
Severity: medium Keywords: stack
Cc: Language:
Patch status: Platform:

Description

I suggest we deprecate the three opcodes pushaction, pushmark, and popmark. These three opcodes are not used much that I am aware of, especially not in PCT. I am also having a lot of trouble personally coming up with compelling use-cases for them that couldn't be better resolved through other methods.

pushmark and popmark especially seem to be worthless considering how emaciated the stacks implementation has become. At the moment, there are almost no ways to use this feature.

The documentation for push action claims that pushed actions are fired when the dynamic environment is unwound due to a subroutine return or an exception being thrown. However, the dynamic_env stack is not unwound in either of these cases, and pushed actions will not be fired then. Because of this limitation, pushaction cannot be used as a general "atexit" mechanism for subroutines (although I can see some benefit in having such a mechanism, and suggest maybe we could create one). The only way apparently to trigger pushed actions is to use the pushmark/popmark combination.

Also, besides firing actions in this way, pushmark and popmark currently serve no other purpose that I can discern.

I suggest we deprecate all these opcodes now, so we can rip them out completely after 2.0.

Change History

Changed 12 years ago by chromatic

  • milestone changed from 2.0 to 2.1

Changed 12 years ago by allison

  • milestone changed from 2.2 to 2.4

Deprecation entry added in 2.3, can be removed for 2.4 release.

Changed 12 years ago by coke

  • owner set to coke

Changed 12 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

Removed in r46262.

Note: See TracTickets for help on using tickets.