Introduction to the Examples Book

EiffelStudio comes with a rich set of examples that you can use to learn how to use the many Eiffel facilities and libraries. You should look first to the examples distributed with EiffelStudio as your primary source of samples of Eiffel in use.

The examples in this book are somewhat different in nature and serve a different purpose.

Although some of the examples included here are provided by Eiffel Software, the intent is that the majority of the entries will be contributed by people like you who use Eiffel daily to solve real problems.

The inspiration for this book is the many program chrestomathies on the World-Wide Web. In natural language, a chrestomathy is a set of literary passages explicitly selected for the purpose of helping learn a language. A program chrestomathy is a set of problems for which solutions are represented in various programming languages with the aim of allowing programmers to compare language capabilities and programming techniques.

Program chrestomathies vary widely. At one end of the spectrum 99 Bottles of Beer has collected solutions in over one thousand programming languages, all targeted to a single problem: generate and print the complete lyrics of the song 99 Bottles of Beer on the Wall. There are several "Hello world!" chrestomathies. Other sites host multiple programming problems, all with solutions in many languages. One large multi-problem site is Rosetta Code. In fact, Rosetta Code maintains a list of links to many of the Web's other programming chrestomathy projects.

Eiffel has a presence on many of these sites. Still, the more examples, the better.

The purpose of the examples in this book, then, is two-fold. First, we get a set of Eiffel examples in the Eiffel online documentation with solutions to a different set of problems than the examples distributed with EiffelStudio. Second, examples from this set can be migrated to Rosetta Code or one of the other chrestomathies to improve Eiffel's presence on those sites. (The caveat to contributors is clear: Contribute only work that you have the authority to release, and only if you are willing to have your work shared on one or more of the program chrestomathies. By submitting content to this Examples book, you agree to release that content under terms no more restrictive than the GNU Free Documentation License.)

Sites like Rosetta Code and Literate Programs offer a wide variety of programming problems or tasks for comparison of languages and techniques. Rosetta Code provides an index to the tasks not yet implemented in Eiffel.

This book should include, but not necessarily be limited to, certain of the problems used as challenges by program chrestomathies.

cached: 12/21/2024 8:44:35.000 AM