liberty-eiffel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Liberty-eiffel] Puzzling inheritance.


From: Paolo Redaelli
Subject: [Liberty-eiffel] Puzzling inheritance.
Date: Fri, 20 Sep 2013 10:11:21 +0200

Looking at code of PRESS_RANDOM_NUMBER_GENERATOR I see a puzzling inheritance scheme.
Why it does inherit and insert the same parent class?
I don't see any rationale behind this.
Shall PRESS_RANDOM_NUMBER_GENERATOR  just inherit MINIMAL_RANDOM_NUMBER_GENERATOR?

Happy hacking
  Paolo


class PRESS_RANDOM_NUMBER_GENERATOR
   --
   -- Press' standard generator, which uses the MINIMAL_RANDOM_NUMBER_GENERATOR
   -- and then uses shuffling to break up short order corelations.
   --
  
inherit
   MINIMAL_RANDOM_NUMBER_GENERATOR
      redefine with_seed, last_integer, last_real, next
      end

insert
   MINIMAL_RANDOM_NUMBER_GENERATOR
      rename next as min_next
      export {} min_next
      redefine with_seed, last_integer, last_real
      end

Puzzling inheritance insertion

reply via email to

[Prev in Thread] Current Thread [Next in Thread]