Introducing the Class Designer

Sign in to queue

The Discussion

  • User profile image
    Maurits
    Very cool!

    I noticed that Fields are private-by-default, and Methods are public-by-default.

    I have to question that... I frequently find myself developing private "helper methods", and it seems that methods should be private by default as a security/encapsulation feature.

  • User profile image
    DashNY
    Maurits wrote:
    Very cool!

    I noticed that Fields are private-by-default, and Methods are public-by-default.

    I have to question that... I frequently find myself developing private "helper methods", and it seems that methods should be private by default as a security/encapsulation feature.



    I strongly disagree. When designing a new class, one should first think of all the public actions it can perform. Once the "public" functionality of a class is finalized, one can jump into the code view and write the definitions of those methods, adding private (helper) methods when neccessary.

Add Your 2 Cents