Skip to content

Conversation

@christoph-dfinity
Copy link
Contributor

No description provided.

@github-actions
Copy link
Contributor

Comparing from 0e7a4b4 to 2670436:
The produced WebAssembly code seems to be completely unchanged.
In terms of gas, no changes are observed in 5 tests.
In terms of size, no changes are observed in 5 tests.


## Variations/Future extensions

- Could move the `self` name into the impl block header `impl (self : T) {}`, to get even closer to the OO notation. Might give the wrong impression that closures are involved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not any more confusing than the using parameters though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I thought about that as I was writing the paragraph. But then I thought I don't have a good argument for why we can't also allow empty, or multi argument lists. But that feels more and more like code obfuscation...

impl () ...
impl (self : Nat, other : Int)

@christoph-dfinity
Copy link
Contributor Author

christoph-dfinity commented Oct 20, 2025

Another thought: Maybe calling it a "methods" block would help with intuition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants