Talk:Default constructor
This is the talk page for discussing improvements to the Default constructor article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||
|
Generalize
[edit]Needs to be generalized. Java also has default constructors. And what about VB or C#? --Uncle Ed 17:02, 16 November 2006 (UTC)
Merging with Nullary constructor
[edit]Object They are clearly two different things. A default constructor is a type of nullary constructor, but a programmer could add a nullary constructor to the program him/herself and it wouldn't be a default constructor. —Preceding unsigned comment added by DisturbedNerd999 (talk • contribs)
C++
[edit]In the case of C++, a default constructor can have parameters, so long as all the parameters have themselves default values. These are plainly not nullary constructors. —SlamDiego←T 21:52, 18 July 2009 (UTC)
Default constructor != Compiler-generated constructor
[edit]The article confuses a default constructor with a compiler-generated constructor. A default constructor is not necessarily generated by the compiler. If the programmer writes a constructor without arguments (or with arguments that all have default values), it is still a default constructor, but at the same time it is a user-defined constructor. The notions of user-defined vs compiler-generated constructors are orthogonal to default and non-default constructors. — Preceding unsigned comment added by Korbateck-delta (talk • contribs) 09:46, 4 April 2014 (UTC)
- Start-Class software articles
- Low-importance software articles
- Start-Class software articles of Low-importance
- Start-Class Computing articles
- Low-importance Computing articles
- All Computing articles
- All Software articles
- Start-Class C/C++ articles
- Mid-importance C/C++ articles
- C++ articles
- WikiProject C/C++ articles
- Start-Class Java articles
- Mid-importance Java articles
- WikiProject Java articles