Tag: constructors

Found 74 results for 'constructors'.

1) c# - C# Constructor and private LINQ to SQL members
2) java - Should constructors ever be used only for side-effects?
3) java - Avoiding side effects in immutable class constructor
4) design-patterns - Patterns for subclass constructors that vary the parent class constructor slightly
5) design-patterns - Handle Named constructors with factory pattern
6) java - Legitimate "real work" in a constructor?
7) object-oriented - Is calling .sort() in the constructor a violation of the guideline that a constructor shouldn't do work?
8) language-agnostic - Is there ever a reason to do all an object's work in a constructor?
9) object-oriented - Does adding values to a dictionary in the constructor violate that "a constructor shouldn't do work"?
10) c# - how complex a constructor should be
11) c# - Constructor parameter validation in C# - Best practices
12) java - Public static method calls private constructor
13) trees - How can I roll-back the execution of a constructor while building a complex data structure?
14) constructors - How to write constructors which might fail to properly instantiate an object
15) java - Writing arguments in constructors
16) c# - When to use Constructor and when to use Collection Initializer?
17) cqrs - Where should an object in CQRS+ES be fully initialized: in the constructor, or when applying the first event?
18) variables - What is the best practice for initializing variables: outside or inside of the constructor?
19) javascript - Why does JavaScript console.log of objects sometimes show prototype/constructor pattern forever
20) coding-style - How can you decompose a constructor?
21) java - How does one keep argument counts low and still keep third party dependencies separate?
22) java - Why is there no default constructor generated if you define an explicit constructor?
23) c++ - List initialization by empty braced-init-list (value-initialization or by initializer_list) vs explicit default initialization, for "list" types
24) java - Where should I put the common code of the constructors?
25) object-oriented - ES6 - Where is it better to initialize a member - parent class or derived class?
26) c# - Why can't I call a constructor in itself?
27) java - Query on usage of 'Window()' default constructor from java.awt
28) design-patterns - Why should I use a factory class instead of direct object construction?
29) object-oriented - Is it bad to access the constructor prototype within the constructor?
30) c++ - C++ - Constructor or Initialize Method to Startup
31) c# - Performing serial communication in constructor to initialize an object
32) design-patterns - Design pattern for too many ctor parameters within class hierarchy
33) c# - Is it bad to create classes whose sole purpose is to be converted to another class implicitly?
34) design - Is it bad practice to simplify constructor dependencies using a simple container when the class represents the entry point for a sub system?
35) c# - Wrapping constructor arguments
36) data - How to deal with constructors in large data classes
37) java - Legitimate "real work" in a constructor?
38) design - Composition without direct instantiation through constructor
39) c# - Constructing an object: should I expose or hide parameters passed to the constructor?
40) c# - Stubbing Properties with private setters for tests
41) java - why can't class directly take arguments instead of using a constructor?
42) c++ - Is a "object constructor" a shorter name for a "function with name `object` returning type `object`"?
43) c++ - Usage of objects in multiple containers in C++
44) object-oriented - Does creating a list in the constructor violate the guideline that a constructor shouldn't do work?
45) java - Is the complexity needed to prevent downcasting from constructor to overridden method worth it?
46) design-patterns - Why did it not become a common pattern to use setters in the constructor?
47) exceptions - Is it fine to make a default constructor unusable?
48) object-oriented - Writing a good/readable constructor that needs a lot of calculation to fill its fields
49) design - Public and Private Constructors with Equivalent Signatures
50) c# - How do constructor parameters of a MVC Controller get set?