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].
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.
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.)
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} .
http://xrl.us/jc4u
IMC vs. PIR Two names enter One name leaves /me giggles -- Chip Salzenberg
Currently no C APIs are deprecated.
newfrom
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):
new
PGE
$P0 = get_hll_global ['PGE'], 'Match' object = $P0.'new'(...)
From http://www.parrotcode.org/docs/ops/var.html, 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 http://www.parrotcode.org/docs/ops/var.html.
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:
They will be removed in the 0.5.0 release.
Type IDs will go away in 0.5.0.
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.
classname
typeof
The experimental instantiate opcode is deprecated and will be removed in the 0.5.0 release.
instantiate
(The instantiate vtable function becomes core in 0.5.0, but is accessed via the "new" opcode for the PMCs that use it.)
PMC* subclass(PMC *name)
The subclass vtable method is deprecated and will be removed in the 0.5.0 release. The subclass opcode stays.
The getclass opcode is deprecated (replaced by the get_class opcode) and will be removed in the 0.5.0 release.
getclass
get_class
The get_mro opcode is deprecated (replaced by inspect) and will be removed in the 0.5.0 release.
get_mro
inspect
The PMC union struct is deprecated and will be removed once all core PMCs have been updated.
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].
float
num
Array
pmc
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
.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].
.HLL_map
The .sym directive will be removed, as there is already the .local directive to declare a variable.
.sym
.local
See [RT#45405]
.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.
Currently no compiler tools are deprecated.
Not yet deprecated, but it's recommended to use the new syntax and gradually change the old.
Instead of:
$P0 = new Integer
or
$P0 = new .Integer # better, but ...
we are moving to use:
$P0 = new 'Integer'
When the first argument of an opcode is OUT, then the assignment syntax will be allowed, as it is today.
OUT
In any other case (i.e. INOUT, IN), this will become a syntax error. For example:
INOUT
IN
$S0 = print $P0 = substr 1, 2, "x"
Will have to be:
print $S0 substr $P0, 1, 2, "x"
To install Parrot::Op, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parrot::Op
CPAN shell
perl -MCPAN -e shell install Parrot::Op
For more information on module installation, please visit the detailed CPAN module installation guide.