IIP-0011: Core Move View Functions#43
Open
lollobene wants to merge 6 commits into
Open
Conversation
lzpap
reviewed
Apr 28, 2026
feb5b9e to
727a814
Compare
727a814 to
9337b94
Compare
miker83z
reviewed
Apr 28, 2026
…m/iotaledger/IIPs into iip-0011-core-move-view-functions
…ng changed Tighten the #[view] definition and rules to forbid returning references (in addition to IOTA objects). Update the compiler guidance to allow emitting warnings (SHOULD -> MAY) for unannotated view-like functions. Replace and expand the examples: the valid/invalid Move modules were overhauled with many more structs and function cases (generics, vectors, options, native functions, templates, and various illegal patterns) to demonstrate allowed patterns (immutable refs, primitive and store-only returns) and disallowed ones (mutable refs, objects by value, returns of objects or references, TxContext mutable refs, etc.).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces the first draft for IIP-0011
Discussion #42