diff --git a/lib/typed/parfait.rb b/lib/typed/parfait.rb index 3d972b7a..4c34c609 100644 --- a/lib/typed/parfait.rb +++ b/lib/typed/parfait.rb @@ -2,7 +2,6 @@ module Parfait end -require_relative "parfait/value" require_relative "parfait/integer" require_relative "parfait/object" require_relative "parfait/behaviour" diff --git a/lib/typed/parfait/integer.rb b/lib/typed/parfait/integer.rb index 101e6aa9..a0fdbec0 100644 --- a/lib/typed/parfait/integer.rb +++ b/lib/typed/parfait/integer.rb @@ -8,7 +8,7 @@ # TODO how this idea works with Numeric ? module Parfait - class Integer < Value + class Integer # :integer?, :odd?, :even?, :upto, :downto, :times, :succ, :next, :pred, :chr, :ord, :to_i, :to_int, :floor, # :ceil, :truncate, :round, :gcd, :lcm, :gcdlcm, :numerator, :denominator, :to_r, :rationalize, diff --git a/lib/typed/parfait/object.rb b/lib/typed/parfait/object.rb index 67b2c98c..d85a59d7 100644 --- a/lib/typed/parfait/object.rb +++ b/lib/typed/parfait/object.rb @@ -15,7 +15,7 @@ module Parfait TYPE_INDEX = 1 - class Object < Value + class Object # we define new, so we can do memory layout also at compile time. # At compile time we fake memory by using a global array for pages @@ -46,7 +46,7 @@ module Parfait def get_internal_word(index) @memory[index] end - + # 1 -based index def set_internal_word(index , value) raise "failed init for #{self.class}" unless @memory diff --git a/lib/typed/parfait/value.rb b/lib/typed/parfait/value.rb deleted file mode 100644 index cb614ef9..00000000 --- a/lib/typed/parfait/value.rb +++ /dev/null @@ -1,15 +0,0 @@ -# Values are _not_ objects. Specifically they have the following properties not found in objects: -# - they are immutable -# - equality implies identity == is === -# - they have type, not class - -# To make them useful in an oo system, we assign a class to each value type -# This makes them look more like objects, but they are not. - -# Value is an abstract class that unifies the "has a type" concept -# Types are not "objectified", but are represented as symbol constants - -module Parfait - class Value - end -end