Would it be better to make them protected when a use case for inheritance arises rather than begin as protected?
-----Original Message----- From: Dmitriy Ryaboy [mailto:[email protected]] Sent: Tuesday, February 02, 2010 7:35 PM To: [email protected] Subject: Private variables are not eco-friendly Hi all, I keep running into problems trying to extend Pig due to variables being declared private. The latest time around it was in PigSlice -- one can't inherit it and do much meaningful overriding of methods because the input streams are private rather than protected, so I can't change how it gets created. I wound up having to copy+paste the class wholesale, which is unfortunate. I know the Slice/Slicer interfaces are going away, but as a general rule -- can we be mindful of folks trying to extend classes, and make inner members protected, rather than private or package? Thanks -Dmitriy
