Re: Re: Re: High level thoughts
Paul Prescod <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Greg Ewing wrote: >... > Experiences I've had in getting C libraries from different sources to > work together has led me to the view that the best way to ensure > interoperability between components is to design them to use nothing > but bog-standard, language-defined data types and structures when > interfacing with the outside world. That is the best you can do when components have no common context other than the language. e.g. a random GUI libarary integrated with a random networking package. But every framework in the universe DOES define standardized interfaces. You're a Mac user so I'm sure you know about the various standardized interfaces like "KVO" and "Drag data source". Every big enough program also grows many standardized interfaces. Plus there are standardized protoocols in the Python world like SAX and DBAPI. Given how common protocols and interfaces are in real programs (to the extent that people fake them and hack them) I do think that the language or library requires first-class support for them. In particular I think that their implications for unit testing are important because a contract enforced (as much as possible) with tests is much more reliable than one that is just expressed in prose. > In Python terms, that means sticking to the basic, well-known > protocols -- number, sequence, mapping, iterator, file, etc. If that were possible there would be no DBSIG API, DOM, SAX, EJB, ADO Datasource, etc. Paul Prescod