(via Keith Devens)
If you are reading LtU, you obviously know that programming languages are first and foremost abstraction mechanisms. They provide us with ways to express our algorithmic intent.
If your software is built from useful abstractions, it is easier to replace a component with a plugin compatible - but different - component. This can help you improve efficiency, enhance relaiblity and so on, simply by replacing and evolving components, without the need to change the design of the application.
In this sense, abstractions simply express a behaves-like property. For example, in some software systems a web page abstaction behaves-like a file object.
This is mostly a software design issue (think coupling) - but the kinds of abstractons you can express depends on the features of the programming language. This short example shows how a list of strings and a generator can be plugin compatible. This allows the programmer to gain some of the advnatages of lazy evaluation.
Nothing very exciting here. Except perhaps that the support for important languages features in Python may lead to their adoption by more mainstream languages.
One more thing. Building abstractions is nice, but in order to build a working system you must also be concerned with the kinds of glue the language provides for connecting the various components. In fact, this glue ultimately controls what abstractions are going to be useful. Generators are obviously a kind of glue.
Posted to Python by Ehud Lamm on 5/6/02; 12:19:34 AM