virtual constructor
[/ˈvɜːr.tʃu.əl kənˈstrʌk.tər/]
nounpl: virtual constructors
construtor virtual
1. A design pattern in object-oriented programming where a static or class method is used to create and return instances of a class, allowing for polymorphic object creation without calling a constructor directly
The Factory pattern implements a virtual constructor to instantiate different subclasses based on parameters.
O padrão Factory implementa um construtor virtual para instanciar diferentes subclasses com base em parâmetros.
2. A technique that simulates constructor behavior through factory methods, enabling dynamic type selection at runtime
Using a virtual constructor allows the client code to remain independent of concrete class types.
Usar um construtor virtual permite que o código cliente permaneça independente dos tipos de classe concretos.
This is technical jargon specific to software engineering and object-oriented programming. The term is used identically in both Brazilian Portuguese and Portugal, as it originated in English-language programming literature. It gained prominence through Bjarne Stroustrup's C++ documentation and the Gang of Four design patterns book. In corporate and academic settings in Brazil, the English term 'virtual constructor' is often used alongside the Portuguese 'construtor virtual'.
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →