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

メソッドの命名を短くする提案 #23

Open
rrbox opened this issue Dec 19, 2022 · 2 comments
Open

メソッドの命名を短くする提案 #23

rrbox opened this issue Dec 19, 2022 · 2 comments
Labels
type: Enhancement New feature or request

Comments

@rrbox
Copy link
Owner

rrbox commented Dec 19, 2022

ビルダーパターンでだいぶコードが短くなりましたが, まだまだ長く読みづらいです.
もっと短くする案も考えた方がいいかもしれません.
注意したいのは, これ以上短くすると, コード規約に反してしまうということです.

@rrbox rrbox changed the title メソッド自体を短くする メソッドの命名を短くする Dec 19, 2022
@rrbox
Copy link
Owner Author

rrbox commented Dec 19, 2022

一案です. 文字列は追いやすくなりました.

let editor = Editor()
    .t("white")
    .f([.fontColor: UIColor.red]).t("red").fe()
    .t("white")

使いやすいかどうかは微妙なところです.

@rrbox rrbox changed the title メソッドの命名を短くする メソッドの命名を短くする提案 Dec 19, 2022
@rrbox
Copy link
Owner Author

rrbox commented Dec 20, 2022

こうしたらいいかもしれない。

let editor = Editor()
    .syntaxSugar
    .t("white")
    .f([.fontColor: UIColor.red]).t("red").fe()
    .t("white")

@rrbox rrbox added the type: Enhancement New feature or request label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant