Skip to content

smlkA/revealing_constructor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

It is called REVEALING CONSTRUCTOR pattern because the constructor is revealing its internal capabilities, but ONLY TO THE CODE THAT CONSTRUCTS.

The advantages of this is that ONLY the CONSTRUCTING CODE has access to internal functions (resolve and reject) and once the object is constructed it can passed around safely; no other code will be able internal functions (reject or resolve) and change the internal state of the object

About

Revealing constructor pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published