in reply to Re (tilly) 2: What does the SHIFT bit do in a constructor
in thread What does the SHIFT bit do in a constructor
In the abstract, I understand and somewhat agree with this criticism. But when you get into a specific object implementation, it often makes a great deal of sense.
It comes down to whether the reader will clearly understand what: my $other= $object->new(); is meant to do. I find that for many specific object implementations, this is a quite natural idiom. So I agree that you should think about what that idiom is supposed to mean in your specific class before you decide either way!
A similar criticism is that you should not name your constructors "new" either. Again, I agree with this in the abstract but find that when I get down to real cases, the criticism usually doesn't apply. For many objects, trying to find a more descriptive name for the constructor that describes how I want to go about creating the object just adds confusion.
- tye (but my friends call me "Tye")
|
|---|