Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROPOSE]:型キーワードを省略した拡張メソッド #107

Closed
taiseiue opened this issue Nov 23, 2023 · 0 comments
Closed

[PROPOSE]:型キーワードを省略した拡張メソッド #107

taiseiue opened this issue Nov 23, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@taiseiue
Copy link
Contributor

新機能の名前

型キーワードを省略した拡張メソッド

次のように、拡張メソッドの定義時に型キーワードを省略できるようにし、省略された場合はvariableの拡張メソッドにする。

void Out(this v)
{
    print(v);
}

動機

ほかの関数が型キーワードを省略できるのに対して拡張メソッドのみできないのは一貫性を損なうから。
また、AliceScript内部では普通に行えるから。

詳細設計

型キーワードが省略された場合はVariable型に関連付ける

欠点

型キーワードをつけるのを忘れてしまうことがある

前例

未確定の設計

@taiseiue taiseiue added the enhancement New feature or request label Nov 23, 2023
taiseiue added a commit that referenced this issue Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant