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

List:       ruby-talk
Subject:    Re: Interfaces in Ruby
From:       Paul Brannan <pbrannan () atdesk ! com>
Date:       2002-10-18 13:42:05
[Download RAW message or body]

On Fri, Oct 18, 2002 at 08:13:18PM +0900, Massimiliano Mirra wrote:
> Now some things bug me about that.  First, as it has already been
> discussed in this group, even if a class implements, say, an interface
> that includes openFile(String path), inferring that upon calling a
> file will be opened is still a matter of deduction and trust.  The
> only thing we know for sure is that there is a method called
> `openFile' and that it accepts a String argument.
> 
> Second, is certifying a behaviour really a class's responsibility?

The intent of an interface is not to cerfity a particular behavior.  It
is to certify that the author's intent is for the class to have a
particular behavior.

Paul


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

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