[Feature Request] Add functionality like @classmethod
to enforce conditional conformance on struct static methods
#3305
Labels
@classmethod
to enforce conditional conformance on struct static methods
#3305
Review Mojo's priorities
What is your request?
Add functionality like
@classmethod
to enforce conditional conformance on struct static methodsWhat is your motivation for this change?
Being able to constraint the calling of a static method according to struct parameters
Any other details?
I don't think it would be a good idea to call them
@classmethod
like Python because it would tie the implementations together (I have no idea what the dynamism of Classes will entail but I imagine it won't be a good idea to mix them together) and be confusing conceptually like @gryznar pointed out in issue #2010 , but I wouldn't remove the method part either. I think just calling them@structmethod
and making the first argstc
(convention, but can call them whatever) will be easy to explain to python devs.The text was updated successfully, but these errors were encountered: