Possibly relevant StackOverflow question:
"Why does constraining a Perl 6 named parameter to a definite value make it
a required value?"
https://stackoverflow.com/questions/48166325/why-does-constraining-a-perl-6-named-parameter-to-a-definite-value-make-it-a-req
On Mon, Jul 19, 2021 at 10:00 AM P
Hi Rob!
Thanks for the reply. So what you're saying is the "backslash-newline"
combination tells the REPL that it has received incomplete input? Otherwise
I don't see how the Raku REPL knows how to cycle from taking input at its
prompt and moving to the read/evaluate step.
I took a quick look at
Matthew has provided some concrete examples of default initializations. I'd
like to scratch the surface of more general problem: encapsulation. In many
cases only a class knows it's real internal structure and can use this
information to protect the data from misuse by 3rd party code which may
On Mon, Jul 19, 2021 at 09:20 Marcel Timmerman wrote:
> On 7/19/21 2:29 PM, Tom Browder wrote:
>
> On Mon, Jul 19, 2021 at 06:57 Marcel Timmerman wrote:
>
> Reading a bit, I came across old documents (with a warning that these are
>> out of date) https://design.raku.org/S02.html#Multiline_Commen
In general, the idea of initialized doesn't mean a lot in Raku, at least
not at the language level.
At any given time, any variable has a value. By default, if you've typed a
variable, it's initially set to the type itself (Any is the default type,
so the default default value). The only exception
Yes. I'm agnostic on this point, but there was a time when some
prominent Perl contributors were dogmatic about it and I didn't know how
widespread it was.
Peter
On 7/19/2021 10:06 AM, Vadim Belman wrote:
Let me guess. The school prohibits object self-initialization? It has
to be done by e
Let me guess. The school prohibits object self-initialization? It has to be
done by external code?
Best regards,
Vadim Belman
> On Jul 19, 2021, at 1:00 PM, Peter Scott wrote:
>
> On 7/19/2021 1:24 AM, Elizabeth Mattijsen wrote:
>> If .new wouldn't initialize a type to its basic instantiation
On 7/19/2021 1:24 AM, Elizabeth Mattijsen wrote:
If .new wouldn't initialize a type to its basic instantiation, what would be
the point of .new then?
FWIW, the same goes for:
dd Int.new; # 0
dd Num.new; # 0e0
dd Complex.new; # <0+0i>
dd Str.new; # ""
If you
On Mon, Jul 19, 2021 at 06:57 Marcel Timmerman wrote:
Reading a bit, I came across old documents (with a warning that these are
> out of date) https://design.raku.org/S02.html#Multiline_Comments . It
> states that any unrecognized format name should be treated as a comment
> block, which the abov
Hi,
Still trying to find a way to have test code in my programs. Normally
not executed but an imported class could make some sense of it. Others
have tried already but I wanted to do the following which looks promising;
=begin Gnome-T
=begin code
my Int $i = 10;
=end code
=end Gnome-T
I c
> On 19 Jul 2021, at 05:49, Peter Scott wrote:
>
> I'm curious as to why Rat.new initializes instead of leaving as undefined:
>
> > $*RAKU
> Raku (6.d)
> > my Rat $p
> (Rat)
> > put $p
> Use of uninitialized value $p of type Rat in string context.
> Methods .^name, .raku, .gist, or .say can be u
11 matches
Mail list logo