argotorg / argotorg/solidity

Allow delete on user-defined value types

Open
#12,273 5 comments 0 reactions 0 assignees View on GitHub
good first issue candidate language design :rage4: low effort low impact must have
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
2d 19h
Merged PRs (30d)
29

Description

We do not allow any operator on user defined value types, but `delete` is special: It is implicitly used when we remove an array element and variables of user-defined value type have a default value - so
```
delete x; // x is of type Type
```
is essentially equivalent to
```
Type y;
x = y;
```
which means we already implicitly use it and it would be confusing to allow re-defining delete to something else.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the compiler handling for operators on user-defined value types and the existing implicit delete behavior when array elements are removed. Confirm the relevant language-semantics and compiler tests, then verify that delete is accepted for these types without becoming redefinable.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.