[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Interfaces in Ruby
From:       "Robert" <bob.news () gmx ! net>
Date:       2003-01-02 14:49:55
[Download RAW message or body]


hi all and a happy new year!

i'm currently getting to know ruby.  i like all that i have seen so far and
especially comparing ruby and perl it has major advantages (clean oo being
the most important imho).

since ruby is dynamically type in principle there is no technical need for
interfaces.  however, if i want to define an interface - say for reasons of
documentation - what is the suggested way to do so?  create a class with a
set of methods returning 'nil' or 'self'?  or create a method, that checks
the interface of an instance and raises a TypeError if any of the methods is
missing?  what would you suggest?

thanks for some insights!

kind regards

    robert


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic