I think it makes sense because that's exactly what Class::Factory does. I don't think it has a name because some other OO languages don't allow you to do this -- if you say 'new Foo()' then you're getting back an object of class 'Foo', not just something that implements 'Foo'. That's why those other languages often use class (or static) methods to implement a factory, like 'Foo.create( ... )'
Chris
M-x auto-bs-mode
In reply to Re: OO: Factory vs. "Seed" (?) pattern
by lachoy
in thread OO: Factory vs. "Seed" (?) pattern
by water
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |