|
|
|
|
|
|
|
|
The Mathematica Programmer: Object-Oriented Programming
|
|
|
|
|
|
Organization: | Wolfram Research, Inc. |
Department: | Kernel Technology |
|
|
|
|
|
|
|
|
|
|
|
|
The object-oriented programming style is becoming increasingly popular. It promises code reuse and easier maintenance of larger projects than is possible with traditional procedural languages. Its use of methods and message passing instead of procedure calls encourages close integration of data and operations. An interactive object-oriented language can easily be implemented in Mathematica. In our last column we discussed two important tools, message passing and objects. We now present the other tools, classes and inheritance. To illustrate the programming style we expand the example developed in our last column and give an implementation of collections.
|
|
|
|
|
|
|
|
|
|
|
|
http://www.mathematica-journal.com/issue/v3i1/
|
|
|
|
|
|
| Accounts.nb (10.3 KB) - Mathematica Notebook | | Classes.m (5.9 KB) - Mathematica Package |
|
|