[Prev][Next][Index][Thread]
Re: Interfaces
"Gregory T. Sullivan" wrote:
> At least Java
> interfaces allow you to specify the names _and_ types of methods that
> must be implemented.
Note the "must be implemented". :-)
> Having type signatures as part of the module system would enable
> better cross-module type checking and better optimization.
Type and other information is exported and used "behind the scenes" by the
compiler, it's just hidden from the programmer. Information hiding can be
good.
The programmer knows from the name whether a given name is a $constant, a
$variable or a <class>, and the signature or layout of these can be
determinded from the documentation. And the compiler will tell you if a
method isn't congruent.
In Java, you still have to read the sources or the JavaDoc to find out about
a method. Dylan is no different, it just has a cleaner and higher-level
syntax for managing name import and export. And it allows code reuse. ;-)
- Rob.
--
Rob Myers - robm@h2g2.com H2G2 - http://www.h2g2.com/
"Don't talk to sociologists. Social practice has no sociological
content."A&L
http://www.robmyers.org/ http://www.gwydiondylan.org/
References: