The `DEPRECATED` function is a feature of Rakudo, not Perl6.
Which means that how it works, and even its existence could be changed
without warning.

It was added so that the compiler and runtime can mark features of itself
as deprecated.
Because of the design of the compiler and runtime, it leaks out into the
userspace.

It is not in ROAST so it is not Perl6.
`is DEPRECATED` is
https://github.com/perl6/roast/blob/master/S02-types/isDEPRECATED.t

    my $a;
    my $awith;
    sub a     is DEPRECATED              { $a++     };
    sub awith is DEPRECATED("'fnorkle'") { $awith++ };

The only thing this use of `DEPRECATED` shows, is that `is DEPRECATED`
could use a new feature for indicating versions.

On Sun, Aug 4, 2019 at 7:20 AM Marcel Timmerman <mt1...@gmail.com> wrote:

> Hi all,
>
> Studying GTK::Simple if found about the existence of a routine
> DEPRECATED which I couldn't find in the Perl6 documents. Reading from
> the code I see that it needs 3 arguments, start version of deprecation,
> version when it is removed and a string like in the 'is DEPRECATED()'
> trait.
>
> A use like
>
> sub gtk_builder_add_from_file ( ... ) {
>    DEPRECATED(
>      'other multi version of gtk_builder_add_from_file', '0.17.10',
> '0.20.0'
>    );
>    ...
> }
>
>
> Gives a result like;
>
> Saw 1 occurrence of deprecated code.
>
> ================================================================================
> Sub gtk_builder_add_from_file (from Gnome::Gtk3::Builder) seen at:
> /home/marcel/Languages/Perl6/Projects/perl6-gnome-gtk3/../perl6-gnome-native/lib/Gnome/N/X.pm6
>
> (Gnome::N::X), line 109
> Deprecated since v0.17.10, will be removed with release v0.20.0!
> Please use other version of gtk_builder_add_from_file instead.
>
> Perhaps it should be added to the docs (or I am look in the wrong spot :-)
>
> Thanks very much for the documentation as it is now
> Regards,
> Marcel
>

Reply via email to