On Sat, 22 Nov 2003, Mark Wilson wrote:
# My own views on interface crystallization:
#
# 1. It should not be done in-line, but rather through a separate express
# creation of an interface table. [Note: one of the nice things about the
# way Ruby (and other languages) does things is the inline creation of
# dispatch on type tables for generic operators through the use of
# classes in an object system. It would be bad to complicate this and
# other elements of Ruby's human interface by also putting interface
# "contracts" inline with Ruby's current (usually very comprehensible)
# class declaration system.]
This is a wonderful idea. Let me restate it to make sure I understand it.
Just as you can do the following:
class Person
def greet(other_person)
other_person.to do
say "hello"
end
end
end
class Person
def some_other_method
end
end
...(I've defined class Person somewhere, but I can always open up the
class again and define something else in it): it would be wonderful if
you can *either* inline it *or* make it external in a similar fashion.
I'm not sure what that would look like, but for those of us who don't want
to use this feature, we could make sure that any "interface" declarations
are contained in separate files and can be excluded when we program.
I think the ability to do this would make the whole idea a lot more
palatable to a lot of us.
Chad