From: James Britt Date: 2004-05-10T07:46:08+09:00 Subject: Re: [ANN] interface 0.1.0 Gavin Sinclair wrote: > On Monday, May 10, 2004, 2:26:57 AM, James wrote: > >>Does the use of interfaces in Ruby encourage a poor (or, say, less >>robust) design? > > > I don't understand this question :/ For example, some developers think Ruby needs static typing. They find a way to add this in, and make it a habit. This is arguably a Bad Thing to the extent that one loses a good deal of the power and flexibility of the language. It's like when Pascal or FORTRAN developers first try their hand at OOP; objects and classes (typically) become mere namespaces for collections of procedures, and the benefits of OOD are lost, because the developer is coding with a foreign mindset. So I'm wondering if the use of interface classes leads one to design Ruby code with a Java mentality. > > >>They seem like a handy way to embed assertions into code to ensure that >>something blows up sooner than later, though perhaps the usual TDD >>arguments apply here. > > > They do apply, but it's not the end of the story. Being able to > selectively apply this interface approach (and/or the StrongTyping > module) is a good thing. If I were forced to use it with every class > I create, it would be frustrating, to say the least. Quite true. But how often, I wonder, do people start out using something like the StrongTyping module, and later on go back and rip it out because it ends up getting in the way? James