VIP: Change bytes length notation #714
Labels
VIP: Approved
VIP Approved
VIP: Discussion
Used to denote VIPs and more complex issues that are waiting discussion in a meeting
Preamble
Simple Summary
Change the bytes decleration syntax to resemble a lists' syntax.
Abstract
Change the byte length syntax on declaring a bytearray.
Motivation
The motivation is critical for VIPs that add or change Vyper's functionality. It should clearly explain why the existing Vyper functionality is inadequate to address the problem that the VIP solves as well as how the VIP is in line with Vyper's goals and design philosopy.
Specification
Currently bytearray size are set using the the smaller-than-or-equal operator
<=
. This VIP will replace it to use the square bracket to indicated the byte size.From
To
This makes it slightly more readable and standardised - because list lengths use the same square bracket subscript notation e.g.
Backwards Compatibility
Not backwards compatible. Fully override the old style.
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: