Skip to content
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

VIP: allow convert-free upcasts #4267

Open
charles-cooper opened this issue Oct 1, 2024 · 0 comments
Open

VIP: allow convert-free upcasts #4267

charles-cooper opened this issue Oct 1, 2024 · 0 comments
Labels
enhancement VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting
Milestone

Comments

@charles-cooper
Copy link
Member

charles-cooper commented Oct 1, 2024

Simple Summary

per title

Motivation

user-friendliness

Specification

allow assignment from smaller types to larger types within the same typeclass (e.g. uint8 -> uint16), without requiring convert.

classes:

  • bytesM -> bytesN
  • uintN -> uintK
  • intN -> intK

example:

def foo(y: uint8):
    x: uint16 = y  # same as x: uint16 = convert(y, uint16)

Backwards Compatibility

stub

Dependencies

If this VIP depends on any other VIPs being implemented, please mention them.

References

Add any references that this VIP might reference (other VIPs/issues, links to blog posts, etc.)

Copyright

Copyright and related rights waived via CC0

@charles-cooper charles-cooper added VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting enhancement labels Oct 4, 2024
@charles-cooper charles-cooper added this to the 0.4.2 milestone Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement VIP: Discussion Used to denote VIPs and more complex issues that are waiting discussion in a meeting
Projects
None yet
Development

No branches or pull requests

1 participant