Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-qxdb6 Total loading time: 0 Render date: 2024-04-27T03:42:09.672Z Has data issue: false hasContentIssue false

13 - Object-oriented programming

Published online by Cambridge University Press:  01 September 2010

Nicholas T. Carnevale
Affiliation:
Yale University, Connecticut
Michael L. Hines
Affiliation:
Yale University, Connecticut
Get access

Summary

Nevertheless, though of real knowledge there be little, yet of books there are a plenty;

Object orientation is in many ways a natural style of programming whose techniques are reinvented constantly by every programer (Coplien 1992). Object notation consolidates these techniques, so that much of the tedious programming necessary to use them is automatically handled by the interpreter. An object can be thought of as an abstract data type that is very useful in separating the idea of what a thing does from the details of the way it goes about doing it. Support for objects in hoc came late to NEURON, after the notion of cable sections, and as a consequence there are several types of variables (e.g. sections, mechanisms, range variables) that are clearly treated as objects from a conceptual point of view but grew up without a uniform syntax.

In hoc, an object is a collection of functions, procedures, and data, where the data defines the state of the object. There is just enough extra syntax in hoc to support a subset of the object-oriented programming paradigm: specifically, it supports information hiding and polymorphism, but not inheritance. Yet this subset is sufficient to greatly increase the user's ability to maintain conceptual control of complex programs.

Type
Chapter
Information
The NEURON Book , pp. 363 - 377
Publisher: Cambridge University Press
Print publication year: 2006

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×