From: Michael DeHaan Date: 2004-11-12T03:26:55+09:00 Subject: Re: Thinking About Java Interfaces In Ruby Yep, Weak-typing isn't a source of errors for me either. Much of the java development cycle is spent casting and boilerplating, IMHO, and for me, that *is* a source of errors -- but I do not find instances in Perl or Ruby where I have an array of gerbils and a giraffee accidentally sneaks in. That just doesn't happen very often, and when it does, it's so rare I'm ok with the runtime exception. Up front checking on some things may be nice, but there are certaintly a reason I am coding in a weakly typed language -- namely, they are still fun to program in and there is much less boilerplate. On Fri, 12 Nov 2004 01:54:35 +0900, James Britt wrote: > Dave Thomas wrote: > > > > > > > On Nov 11, 2004, at 9:32, Lothar Scholz wrote: > > > >> Hello James, > >> > >> JEGI> You don't really just say, "Pass in an object that responds to > >> X, Y, > >> JEGI> and Z." in the RDoc, do you? > >> > >> Unfortunately yes. And it is of course a huge source of errors. > > > > > > Strange - that's not my experience. > > Nor mine. But there are some number of people who believe this to be true. > > In some cases, they believe this because they heard it from a source > they trust. But for those who actually experience this, I wonder if > there is something about their coding/design process that differs from > those who find duck typing largely trouble-free. > > Put another way, some find duck typing "a huge source of errors", others > do not. I do not think anyone is lying, so what accounts for the > difference? Class/method design? Unit testing? LOC? > > James > >