Improve type system function: type_spec_is_assignable_to
, and applying them to ABI value set
method
#583
Labels
type_spec_is_assignable_to
, and applying them to ABI value set
method
#583
Problem
Under this thread of discussion: #567 (comment), as we are applying
type_spec_is_assignable_to
over ABI valueset
method, this brings question on ABI value inheritance hierarchy and type system design, for example:address
should be less generic thanbyte[32]
, but theset
method allows for setting from byte static array.StaticBytes
brings backwards incompatibilityStaticBytes
bypasses the type system, breaking soundness of type systemNamedTuple
should be narrower (more specific) thanTuple
, butNamedTuple
inherits fromTuple
.This brings some thinking about what we need to do to reconstruct the inherit hierarchy.
Solution
🤔... nondeterminstically thinking
Dependencies
The merge of PR #567 lays the ground of construction.
There are some experimental work in PR #567 and #580 to see what would be the impact of applying "type system" over ABI value assignment, but they went stale after we realized that more efforts needed.
Urgency
Low? For
type_spec_is_assignable_to
is applied for some bug fixes, but definitely good to have relaxed version of ABI value assigning, rather than exact type-spec equivalence.The text was updated successfully, but these errors were encountered: