New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document $; #2642
Comments
|
because its deprecated, see: #2632 |
|
Not really deprecated, it should throw an exception, but it does not:
--
say "\$; is ", $; # OUTPUT: «$; is (Any)»
When it's fixed, that behaviour should be documented anyway, maybe in
perl5to6-variables
El sáb., 2 mar. 2019 a las 22:10, Herbert Breunung (<
notifications@github.com>) escribió:
… because its deprecated, see: #2632
<#2632>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2642 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAB9AU0YgowN3f3SPxl24as_sujmhOMks5vSui6gaJpZM4bakBw>
.
--
JJ
|
|
There is no It is an anonymous state variable my $a := $; my $b := $; # two separate $ variables
$a = 1;
say $b; # (Any)my $c := $_; my $d := $_;
$c = 3;
say $d; # 3say ++ $ for ^3
# 1
# 2
# 3If you tried to use it in a string you get a compilation error. " $; "
# ===SORRY!=== Error while compiling:
# Non-variable $ must be backslashedSo the only place it really makes sense to talk about it is in 5to6-perlvar. |
|
Right. Some of the other variables, however, exist, even if they return Any.
|
|
According to the raku-golf-cheatsheet repo, there's only |
|
The thing is that the specs for 6.d say:
Trying to use variables $;, $,, $., $\, $(, $),$<, $>, $/, $\, $[, $-, $+,
and $@ throws X::Syntax::Perl5Var
So it's not so much a matter of what degree of existence they have; they do
exist enough to be documented if that's the case. Problem is I don't see
how we could actually use $; of for that matter $, Using any one of them
behaves as @b2gills says.
|
|
Oh, the parser does attempt to detect the use of these variables. For example: $; = 42 |
|
Then that's what should be documented, I guess.
|
|
Not really, no. IMO these error messages shouldn't even be enabled by default (you should only see them with |
|
Given that this is only part of the 5 to 6 training wheels, I think it's OK that it's only listed on the 5 to 6 page, and that it's not indexed. (it is findable if you use the search site option). The documentation on this page says:
Closing ticket. |
The problem
The C<$;> variable is only in 5to6-perlvar doc.
Suggestions
It would be good if it had its own doc, in Variable.pod6 for instance
The text was updated successfully, but these errors were encountered: