The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Deprecation in Parrot

This is a list of currently deprecated features of Parrot. Every deprecation should have an associated RT ticket, but this is not the case yet [RT#41226].

new object system

The object system of Parrot is being overhauled. This touches some opcode and PIR syntax. So some deprecation can be found in pdd17_pmc.pod.

nonexisting array elements

As of the 0.5.0 release, fetching an element that doesn't exist from an array will return a null PMC, instead of Undef. (Returning a null PMC can be considered the standard behavior for Parrot aggregates when accessing an element that doesn't exist. HLL aggregates define their own behavior.)

PGE::P6Regex and pgc.pir

In early 2007 there were a number of changes made to the Perl 6 regular expression syntax (as given by Synopsis 5). The new syntax is implemented via the PGE::Perl6Regex compiler, and the PGE::P6Regex compiler is now deprecated in favor of the new syntax.

Similarly, the pgc.pir compiler (for grammars) is deprecated in favor of runtime/parrot/library/PGE/Perl6Grammar.{pir|pbc} .

.imc file extension

http://xrl.us/jc4u

 IMC vs. PIR
 Two names enter
 One name leaves

 /me giggles
 -- Chip Salzenberg

Deprecated C APIs

Currently no C APIs are deprecated.

Deprecated methods

newfrom sub/method in PGE

The newfrom method in PGE is now deprecated. Use new instead. To get access to the new method when a Match object isn't available, use the PGE::Match protoobject (available in the PGE namespace):

    $P0 = get_hll_global ['PGE'], 'Match'
    object = $P0.'new'(...)

Deprecated ops

From http://www.parrotcode.org/docs/ops/var.html, the following ops are deprecated:

store_global
find_global
find_name

There are several variants of some of the above ops; all are deprecated, and are replaced by the ops {set,get}_[hll,root]_global. See also http://www.parrotcode.org/docs/ops/var.html.

substr_r

For now this op will stay available as an experimental op [RT#41749].

From http://www.parrotcode.org/docs/ops/experimental.html, the following ops are deprecated:

new(out PMC, in INT, in STR)

They will be removed in the 0.5.0 release.

Deprecated Class Features

  1. Type IDs will go away in 0.5.0.

  2. The classname op is deprecated and will be removed in the 0.5.0 release. It's an exact duplicate of the string return variant of the typeof op.

  3. The experimental instantiate opcode is deprecated and will be removed in the 0.5.0 release.

    (The instantiate vtable function becomes core in 0.5.0, but is accessed via the "new" opcode for the PMCs that use it.)

  4.   PMC* subclass(PMC *name)

    The subclass vtable method is deprecated and will be removed in the 0.5.0 release. The subclass opcode stays.

  5. The getclass opcode is deprecated (replaced by the get_class opcode) and will be removed in the 0.5.0 release.

  6. The get_mro opcode is deprecated (replaced by inspect) and will be removed in the 0.5.0 release.

  7. The PMC union struct is deprecated and will be removed once all core PMCs have been updated.

deprecated PIR syntax

type names

As of Parrot 0.4.16 all type names for .local other than string, num, int, and pmc are deprecated. Using float for num or a basic PMC name like Array for pmc will no longer be possible in Parrot 0.4.17. [RT#42769].

optional comma in sub flags

The optional comma to separate subroutine flags will be removed in Parrot 0.4.17. [RT#45679]. This will no longer be valid PIR code:

 .sub main :main, :load, :init
 #
 .end

Instead, you should write:

 .sub main :main :load :init
 #
 .end
.HLL_map INTC, INTC will become .HLL_map STRINGC, STRINGC

As the dot-prefix type notation (for instance, '.Integer') is disappearing, the .HLL_map syntax will also be updated to take strings to indicate the types. [RT#45453].

.sym directive

The .sym directive will be removed, as there is already the .local directive to declare a variable.

See [RT#45405]

.local macro labels will become .label

In macros you can declare a unique label by writing:

 .local $myLabel:

This will be automagically translated into some magic that generates a unique label. The .local directive will be changed into .label.

See [RT#45405]

Deprecated compiler tools

Currently no compiler tools are deprecated.

FUTURE changes

Not yet deprecated, but it's recommended to use the new syntax and gradually change the old.

PMC Class name IDs

Instead of:

  $P0 = new Integer

or

  $P0 = new .Integer # better, but ...

we are moving to use:

  $P0 = new 'Integer'
Assignment syntax with opcodes [RT#36283]

When the first argument of an opcode is OUT, then the assignment syntax will be allowed, as it is today.

In any other case (i.e. INOUT, IN), this will become a syntax error. For example:

    $S0 = print
    $P0 = substr 1, 2, "x"

Will have to be:

    print $S0
    substr $P0, 1, 2, "x"