Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
225 lines (131 sloc) 5.14 KB

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} .

Deprecated C APIs

Currently no C APIs are deprecated.

Deprecated methods

No methods are known to be deprecated.

Deprecated ops

From, the following ops are deprecated:


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


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

From, the following ops are deprecated:

new(out PMC, in INT, in STR) (RT #47011)

The VTABLE method 'new_from_string' will be removed.

They will be removed in the 0.5.0 release.

Deprecated Class Features

  1. Type IDs will go away in 0.5.0. Instead of:
      $P0 = new Integer


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

    we are moving to use:

      $P0 = new 'Integer'
  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. (RT #42969)

  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 Exception Features

  1. Attributes on exception objects will no longer be accessible by integer or string key, use getattribute and setattribute instead. Slated for removal in the 0.5.2 release.

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].

.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]

.namespace [ "a" .. "b" ]

IMCC currently allows for writing:

.namespace ["a" .. "b"]

This does not make sense, and this slicing syntax will be deprecated.

See [RT#46715]

.pcc_ prefix

The .pcc_ prefix on the directives for subroutine invocation will be removed after the 0.5.0 release. .pcc_begin_return will become .begin_return. .pcc_{begin,end} will become .{begin,end}_call.

See [RT#45925].

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.

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"
Jump to Line
Something went wrong with that request. Please try again.