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
[Feature Request] Nudge new users away from calling dunder methods directly #2616
Comments
Ideas:
|
I would expect all accessible members of a struct to be displayed in auto-complete after you type the But I agree that dunder methods should appear at the bottom of the auto-complete list. The OP's issue—that learners are using dunder methods inappropriately—shouldn't be addressed by gimping auto-complete. 😢 It should be addressed by improving Mojo's educational materials! |
Review Mojo's priorities
What is your request?
Is it possible for Mojo tooling like the LSP or compiler to nudge new users away from directly calling dunder methods by providing some diagnostic or warning?
What is your motivation for this change?
It's becoming obvious that new users without previous experience using Python do not understand how dunder methods work, nor how they fit into the language. It would be helpful if these new users were nudged into using dunder methods correctly.
Any other details?
You can check this video to see an example of what I'm talking about - https://youtu.be/mB_1SQlS_B0?si=KtpRjsYsJsxQfBpH&t=250
The text was updated successfully, but these errors were encountered: