Skip to content

Implementation of private methods #889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

sievlev
Copy link

@sievlev sievlev commented Jan 22, 2013

In current implementation of widgets it's easy to accidentally overload an internal methods.

For example, I can create an own _createButtons() method in my widget inherited from $.ui.dialog. As a result I will corrupt internal routines in $.ui.dialog widget.

I suggest to implement a real private methods to avoid possible conflicts.
For simplicity reasons I suggest to expand naming conventions. Like in python or glibc all methods started with two underscore symbols will be treated as a private methods.
To call a private method you will have to use a special call similar to _super.

Store private methods in separate containter accessible via special _private call.
All methods started with a two underscore symbols treated as a private.
@scottgonzalez
Copy link
Member

No, we're not going to hide methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants