You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've thought about this in the past, but I don't think it's a good idea. The whole point of Self is to act as a shorthand for writing out the full type with all of its parameters. Beyond that, it has no purpose. If you're going to write out the parameters, you may as well use the full struct name.
Also, Self needs to have a singular, consistent meaning, so it doesn't seem reasonable to make parameters on Self "optional", in the sense that if you omit them, they are populated with the parameter values of the enclosing definition. (As they are today.)
Review Mojo's priorities
What is your request?
Hello,
here is a feature request that seem useful:
It could also be useful with decayed reference but not sure !
What is your motivation for this change?
The motivation is to make struct more parametrizable in general,
the idea occurred to be me while trying to contribute a feedback on the Decayed lifetime proposal.
This could allow to convert a non-decaying one into a decaying one, in order to
__getitem()__
only the non decaying references.That way, only non-decaying references could be manually dereferenced, and decaying ones would be auto-dereferenced.
Not sure if it would work, but if it could be useful for that, it could be useful for many usecases.
Any other details?
No response
The text was updated successfully, but these errors were encountered: