I do appreciate your reply. You said Car->new, then had a means of figuring out it was a BMW, so I'll take that as a + vote (not literally, of course).
Got your caution about circular dependancies. This seems at least to be a limited breach of said contract. Just call Car->new once, then forevermore know that the returned object is typed according to your specifications. No harm in that? <grin>
In reply to Re: Inheritance: parent class determine which child class to use?
by fbicknel
in thread Inheritance: parent class determine which child class to use?
by fbicknel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |