Search code examples
covarianceeiffel

Eiffel: like Precursor


Maybe I'm going to far, but Eiffel is such a beauty that I'd like to be able to say like precursor for Result class of function

My point is

deferred class A
    give_me_foo: STRING
    deferred
    end
end -- class

class real_foo
    give_me_foo: like Precursor
        do
        end
end -- class

Would be nice, does it exist?

Update: I let a wish on Eiffel site here


Solution

  • Unfortunately no, however this is possible:

    give_me_foo: like {A}.give_me_foo
    

    which is less elegant but more explicit.