Piers Cawley wrote:
> Damian Conway <[EMAIL PROTECTED]> writes:
>
>>Multiple inheritance will be:
>>
>> class Derived is Base1 is Base2
>>
>>or possibly:
>>
>> class Derived is Base1 Base2
>
>
> How about class Derived is all(Base1, Base2);
Close, but no cigar. You meant:
cl
Trey Harris wrote:
> Then I'd assume that multiple inheritance of both types would also
> conform?
Yes.
> So if $! is Errno, where class Errno is str is int
> that would work too?
I very much doubt you'll be able to inherit from the builtin types.
> (or is that Errno is str, int?),
M
[EMAIL PROTECTED] wrote:
> [...] whose type is simultaneously C and C.
Has any thought yet gone into the builtin Perl types and what they will
be called in Perl 6? Will there be a difference between the C of
something and the type(s) that C returns?
In keeping with the lower case C and C exa
In a message dated Sat, 17 Aug 2002, [EMAIL PROTECTED] writes:
> [$!] Typically contains an object with both string and integer
> conversions. Whether convertability to both types is enough to satisfy a
> superpositional type is an interesting question. I suspect it *is*.
Then I'd assume that mul
Aaron Sherman wrote:
> So,
>
> my all(str, int) $foo = $!;
>
> would be fine?
I'd expect so.
> I'm forgetting what has been said about $!
Typically contains an object with both string and integer conversions.
Whether convertability to both types is enough to satisfy a
superpositional
On Sat, 17 August 2002, Nicholas Clark wrote:
> But how on earth would you implement such a thing? :-)
I imagine that type specifiers require that values assigned to
the corresponding variable satisfy: value.isa(type). Using a
superposition as a type means that the result of that test comes
ba
On Fri, 2002-08-16 at 19:05, [EMAIL PROTECTED] wrote:
> On Fri, 16 August 2002, Luke Palmer wrote:
>
> > I want superpositions too :). But, what would this mean?
> >
> > my all(str, int) $foo;
> > #...
>
> That you need some *serious* psychotherapy! ;-)
>
> Actually, it would mean tha
On Sat, Aug 17, 2002 at 06:41:02AM +1000, Damian Conway wrote:
> Well, I'm still hopeful Larry will approve superpositions. In which case,
> since types in Perl 6 are first-class, you would be able to write
> the same thing something like:
>
>
> class Foo {
> attr any(str,int
On Fri, 16 August 2002, Luke Palmer wrote:
> I want superpositions too :). But, what would this mean?
>
> my all(str, int) $foo;
> #...
That you need some *serious* psychotherapy! ;-)
Actually, it would mean that $foo can only contain values
whose type is simultaneously C and C.
> Well, I'm still hopeful Larry will approve superpositions. In which case,
> since types in Perl 6 are first-class, you would be able to write
> the same thing something like:
>
>
> class Foo {
> attr any(str,int) $bar;
>
> method SETUP(any(str,int) $newBar) {
Chris Dutton wrote:
> and this just jumped out at me:
>
> class Foo {
> private string|int bar;
> static create(string|int newBar) {
> bar = newBar;
> }
> }
>
> In other words, as I understand it, you can type the variable bar as
> either an int or a string.
>
> Aside
and this just jumped out at me:
class Foo {
private string|int bar;
static create(string|int newBar) {
bar = newBar;
}
}
In other words, as I understand it, you can type the variable bar as
either an int or a string.
Aside from simply, "my $bar;", w
12 matches
Mail list logo