Re: What are Protocols?
Paul Prescod <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Serge Orlov wrote: >... > asSomething_ namespace will be reserved for standard library. Or course > if you send money to Mark he will allocate names for all interfaces in > your library :-) It's a design decision whether to treat built-in interfaces specially or not...I used iterator as a general case of a protocol because everyone is familiar with it. I really like the idea of having test suites as the majority of the "body" of protocols. First, it fits well with the current trend towards test-driven design. Second, it helps to address the complaints of those who say that they need static type checking to find type errors. Test suites are much more powerful for verifying conformance to an "interface" than static type checks. Rather than being defensive about why Java has interfaces and we don't we should point out that our interfaces are potentially much more disciplined than theirs. Prothon's marketing schtick should be that it is like Python but optimized for better scalability to big apps. Paul Prescod