Hi,
On 01/27/2016 07:17 AM, Felipe Gasper wrote:
Hello,
What is the purpose of having $! in Perl 6?
The global variables in Perl 5 are a constant headache, prompting
us to need to local()ize variables like $@, $!, and $? to avoid
unforeseen consequences like RT #127386 and those docu
On 27 Jan 2016 7:15 AM, Moritz Lenz wrote:
On 01/27/2016 07:17 AM, Felipe Gasper wrote:
Hello,
What is the purpose of having $! in Perl 6?
The global variables in Perl 5 are a constant headache, prompting
us to need to local()ize variables like $@, $!, and $? to avoid
unforeseen cons
On 01/27/2016 03:15 PM, Felipe Gasper wrote:
So, what *is* the scoping of $!?
Scoped to a routine, iirc (sub, method, regex)
On 27 Jan 2016 10:15 AM, Moritz Lenz wrote:
On 01/27/2016 03:15 PM, Felipe Gasper wrote:
So, what *is* the scoping of $!?
Scoped to a routine, iirc (sub, method, regex)
Interesting. JavaScript programmers that I’ve known bemoan that their
language uses function scoping rather than block sc
On Wed, Jan 27, 2016 at 10:32:46AM -0500, Felipe Gasper wrote:
[snip]
> But, what is the point of $! at all? The exception is given to the CATCH
> block as $_. If I want access to it outside CATCH, isn’t the expected
> workflow to save CATCH{$_} to a variable, the way my example does it?
Well, it
On 01/27/2016 04:32 PM, Felipe Gasper wrote:
On 27 Jan 2016 10:15 AM, Moritz Lenz wrote:
On 01/27/2016 03:15 PM, Felipe Gasper wrote:
So, what *is* the scoping of $!?
Scoped to a routine, iirc (sub, method, regex)
Interesting. JavaScript programmers that I’ve known bemoan that their
langua
On 27 Jan 2016 10:44 AM, Peter Pentchev wrote:
On Wed, Jan 27, 2016 at 10:32:46AM -0500, Felipe Gasper wrote:
[snip]
But, what is the point of $! at all? The exception is given to the CATCH
block as $_. If I want access to it outside CATCH, isn’t the expected
workflow to save CATCH{$_} to a vari
On 27 Jan 2016 10:56 AM, Moritz Lenz wrote:
But, what is the point of $! at all?
Convenience. It makes it easy to write commonly-used constructs much
faster.
My mostly unscientific approach to gather usage of try vs. CATCH in the
ecosystem:
moritz@hack:~/p6/perl6-all-modules$ git grep --word
On 27 Jan 2016 11:03 AM, Brandon Allbery wrote:
On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper mailto:fel...@felipegasper.com>> wrote:
Unrelated, but, does open() not throw on failures anyway? (Noodling
with the perl6 REPL just now seems inconclusive.)
There have been issues with fai
On Wed, Jan 27, 2016 at 11:00 AM, Felipe Gasper
wrote:
> Could it not be:
>
> try my $f = open(...) or die …
>
Don't need a "try" there to make it work. An exception object/failure is
false, so "my $f = open(...) or die" will assign the exception to $f, which
is false, causing the "die" to execu
10 matches
Mail list logo