HaloO,
John M. Dlugosz wrote:
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
It's called overload resolution. Perl 6 can't do
that at compile time unless *all* targets are
available as rw and readonly variants.
I don't follow that statement. Can you give an example?
multi sub foo (Int $i
HaloO,
I wrote:
class C does A does B {...} # enters C into WHAT space
my $y = C.new; # $y.WHAT =:= C
my $b <: B; # automatically re-typing container
my $a <: A; # means e.g. my A $a is autotype
$b = $y; # now $y.WHAT =:= B
$a = $y; # now $y.WHAT =:= (A&B)
This last assignm
TSa (>):
> sub bar ($x)
> {
>$x = 3; # error, $x is readonly
>foo($x); # error, could hit rw Str
> }
By the way, I hope it's possible to make the assignment `$x = 3` to
the read-only variable $x a compile-time error.
In fact, I hope this to such a degree that I would like it to be part
HaloO,
I wrote:
John M. Dlugosz wrote:
> I wrote a complete treatment of Inf support.
> Please take a look at "24.26 Infinite" on pages 116-119, and
> "3.11.3 Infinities" on pages 26-27.
I have a lot to say to that. Please give me time.
I find your treatment of Inf too Num centric. E.g. al
HaloO,
Carl Mäsak wrote:
By the way, I hope it's possible to make the assignment `$x = 3` to
the read-only variable $x a compile-time error.
I hope so, too. The variable and its read-only constraint
is known at compile time and *not* dependend on the value
inside. How it came in there in the f
On Fri, May 09, 2008 at 03:02:28PM +0200, Carl Mäsak wrote:
> TSa (>):
> > sub bar ($x)
> > {
> >$x = 3; # error, $x is readonly
> >foo($x); # error, could hit rw Str
> > }
>
> By the way, I hope it's possible to make the assignment `$x = 3` to
> the read-only variable $x a compile-time
Pm (>):
> In Rakudo's case, we just haven't implemented read-only traits
> on variables yet.
Goodie. I guessed as much.
> But yes, I expect that it will be caught as
> a compile-time error.
And do you agree it's reasonable to expect this of every compiler?
// Carl
TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:
E.g. sqrt(2) might return a special Inf that can be lazily
stringified to an arbitrary long sequence of digits of sqrt(2).
???
The sqrt(2) should be a Num of 1.414213562373 with the precision of the
native floating-point that runs at full spe
On Fri, May 09, 2008 at 05:09:31PM +0200, Carl Mäsak wrote:
> Pm (>):
> > In Rakudo's case, we just haven't implemented read-only traits
> > on variables yet.
>
> Goodie. I guessed as much.
>
> > But yes, I expect that it will be caught as
> > a compile-time error.
>
> And do you agree it's rea
Carl Mäsak cmasak-at-gmail.com |Perl 6| wrote:
Pm (>):
In Rakudo's case, we just haven't implemented read-only traits
on variables yet.
Goodie. I guessed as much.
But yes, I expect that it will be caught as
a compile-time error.
And do you agree it's reasonable to expect t
10 matches
Mail list logo