On 7/27/05, Larry Wall [EMAIL PROTECTED] wrote:
On Wed, Jul 27, 2005 at 11:00:20AM +, Luke Palmer wrote:
Everything that is a Num is a Complex right?
Not according to Liskov. Num is behaving more like a constrained
subtype of Complex as soon as you admit that isa is about both
Luke Palmer wrote:
Everything that is a Num is a Complex right?
Not according to Liskov But this is one of the standard OO
paradoxes, and we're hoping roles are the way out of it.
Well, everything that is a Num is a Complex in a value-typed world,
which Num and Complex are in. I
On Wed, 27 Jul 2005, [ISO-8859-1] TSa (Thomas Sandla?) wrote:
value to carry on a useless imaginary part. And
Complex should consistently return undef when compared
to other Nums or Complexes. And the Compare role
My 0.02+0.01i: in mathematics it is commonly used to write e.g. z3 to
mean z
HaloO Michele,
you wrote:
On Wed, 27 Jul 2005, [ISO-8859-1] TSa wrote:
value to carry on a useless imaginary part. And
Complex should consistently return undef when compared
to other Nums or Complexes. And the Compare role
My 0.02+0.01i: in mathematics it is commonly used to write e.g. z3
http://repetae.net/john/recent/out/supertyping.html
This was a passing proposal to allow supertype declarations in
Haskell. I'm referencing it here because it's something that I've had
in the back of my mind for a while for Perl 6. I'm glad somebody else
has thought of it.
Something that is
[sorry Luke, I hit Send too soon]
On 7/27/05, Luke Palmer [EMAIL PROTECTED] wrote:
There is probably a better word than contains. I was thinking set
theory when I came up with that one.
What about derives?
Aankhen
Hi,
Luke Palmer wrote:
http://repetae.net/john/recent/out/supertyping.html
This was a passing proposal to allow supertype declarations in
Haskell. I'm referencing it here because it's something that I've had
in the back of my mind for a while for Perl 6. I'm glad somebody else
has
On 7/27/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote:
Luke Palmer wrote:
role Complex
does Object
contains Num
{...}
I've probably misunderstood you, but...:
role Complex does Object {...}
Num does Complex;
# That should work and DWYM, right?
HaloO,
Ingo Blechschmidt wrote:
I've probably misunderstood you, but...:
role Complex does Object {...}
Num does Complex;
# That should work and DWYM, right?
My 0.02: Complex should provide e.g. a + that, when
called with two Nums, doesn't bother the return
value to carry on a
On Wed, Jul 27, 2005 at 11:00:20AM +, Luke Palmer wrote:
: Let's say that Perl 6 does not provide a complex number class by
: default. How would you go about writing one? Well, let's do the
: standard Perl practice of making words that your users are supposed to
: say in their code roles.
:
10 matches
Mail list logo