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'.
Synonyms / Sinônimos
factory methodfactory constructorstatic factory methodcreation method
Antonyms / Antônimos
direct constructorexplicit constructor call

Regional Variations

General Brazilian
construtor virtual
Standard term used in software development and computer science education
Portugal
construtor virtual
Same terminology as Brazilian Portuguese; primarily technical jargon
USA/Canada
virtual constructor
Widely used in programming literature and documentation, especially in C++ and design patterns contexts

Related Words

design patternpolymorphismfactory patternobject creationinheritanceabstract classinterface

Related Idioms & Phrases

factory method pattern
object creation pattern
polymorphic instantiation
Look up more words on Fala2Me
The free English-Portuguese dictionary with real Brazilian accents, NYC slang, conjugator and more
Open Fala2Me →