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
Solidity currently doesn't allow converting array literals to dynamically sized memory arrays. This restriction makes initializing dynamic arrays with literals more complex and less intuitive. According to the v0.8.28 documentation, this restriction is planned for removal. I would like to know if there are plans to implement this change.
Motivation
Developers need to write extra code to initialize dynamic arrays, which can lead to longer and harder-to-read code.
Modify the Solidity compiler to allow the assignment of array literals directly to dynamically sized memory arrays, enabling more intuitive and concise array initialization.
Backwards Compatibility
This change is backward compatible as it only introduces new syntax, ensuring that existing codebases remain unaffected and current methods for initializing dynamic arrays continue to function as before.
The text was updated successfully, but these errors were encountered:
Abstract
Solidity currently doesn't allow converting array literals to dynamically sized memory arrays. This restriction makes initializing dynamic arrays with literals more complex and less intuitive. According to the v0.8.28 documentation, this restriction is planned for removal. I would like to know if there are plans to implement this change.
Motivation
Developers need to write extra code to initialize dynamic arrays, which can lead to longer and harder-to-read code.
Current:
Proposed:
Specification
Modify the Solidity compiler to allow the assignment of array literals directly to dynamically sized memory arrays, enabling more intuitive and concise array initialization.
Backwards Compatibility
This change is backward compatible as it only introduces new syntax, ensuring that existing codebases remain unaffected and current methods for initializing dynamic arrays continue to function as before.
The text was updated successfully, but these errors were encountered: