constructor

<programming>

1. In object-oriented languages, a function provided by a class to initialise a newly created object. The constructor function typically has the same name as the class. It may take arguments, e.g. to set various attributes of the object or it may just leave everything undefined to be set elsewhere.

A class may also have a destructor function that is called when objects of the class are destroyed.

2. In functional programming and type theory, one of the symbols used to create an object with an algebraic data type.

Last updated: 2014-10-04

Nearby terms:

constructive proofconstructive solid geometryconstructorConsulconsultant

Try this search on Wikipedia, Wiktionary, Google, OneLook.



Loading