[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Liberty-eiffel] Why aren'
From: |
Laurie Moye |
Subject: |
[Liberty-eiffel] Why aren' |
Date: |
Sat, 27 Sep 2014 18:35:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
Hi,
Could someone help me with a little problem please?
First, might I mention that in my previous post I said "infix
operators... starting with #, which upset the compiler". That was just
me getting confused, '#' is fine, but I would still appreciate knowing
what characters are allowed in free operators.
My problem is with marix and vector classes which date back to Eiffel/S
days. I think ES implemented polymorphism in a rudimentary way which
made it really easy to define
"class VECTOR[ G -> NUMERIC ]".
When I converted the code to SmallEiffel, I could no longer make the
polymorphism work, and had to expand it all out into classes like
VECTOR_OF_REAL_64.
I am trying to make the polymorphic code work again in LE. Most of the
code only uses the basic arithmetic operators which are declared in
NUMERIC, but for some puropses I need to use features like 'abs'. These
are not declared in NUMERIC, but when I found them in REAL_GENERAL and
INTEGER_GENERAL, I thought I had found a way round this, but the
compiler tells me:
" Fatal Error: The INTEGER_GENERAL type cannot be used here. Actually
this is only a compiler implementation facility."
As all the real and integer classes have, for example, 'abs', why can't
these common features be declared in NUMERIC so that I can use them in
generic code for any numeric class?
Is there a way round this, or am I doomed to have to have classes like
VECTOR_OF_REAL_64?
Best wishes,
Laurie
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Liberty-eiffel] Why aren',
Laurie Moye <=