From: Sean O'Dell Date: 2003-11-22T02:22:30+09:00 Subject: Re: "stereotyping" (was: Re: Strong Typing (Re: Managing metadata about attribute types) ) On Friday 21 November 2003 02:20 am, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: "stereotyping" (was: Re: Strong Typing (Re: Managing > metadata about attribute types) )" > > on 03/11/21, "Sean O'Dell" writes: > |This is, I think, the clearest I can make the new proposal tonight: > | > |http://www.rubygarden.org/ruby?InterfaceContracts > > I read the proposal. It's huge modify, which potentially affect > Ruby's character very much. I know "interface contract" (using your > new term) is a good thing, putting aside the syntax in the example I > don't like. But *I* have to consider its trade-off. > > What we gain and what we lose? Selling point? I don't care. > Better diagnosis? It's good, but worth this big change? > I don't know yet. Some of the things we gain were listed in the proposal. As to benefit: it depends on who you care about. Programmers, and especially library authors, gain a way to help people learn a little about their code and to catch potential errors in pitfalls. Project developers gain pretty much the same things: the ability to share code and help their co-workers understand a little more about their code and to help prevent them from making some obvious mistakes. We also gain some speed in debugging: where interfaces are used by people unfamiliar with the code they are calling into (through ignorance and lack of documentation) it's faster responding to a nice error message about type incompatibilities than it is to wonder about an error regarding method calls. Project managers are also far more likely to implement Ruby in their projects if they feel it is as safe as what they need, and type checking is one of the safety catches that a lot of people have grown comfortable with. It's also something Python doesn't have, and will be one of the things you can flat-out say "we have it, they do not." Worth it? In my opinion, absolutely. > p.s. > Please do not use bad words everyone. Except in private email, of course, as Ziegler clearly already knows. Thanks for the fan mail, Ziegler!