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

よくある「ヤバそうな」Kotlinコード #802

Open
hkurokawa opened this issue May 5, 2019 · 2 comments
Open

よくある「ヤバそうな」Kotlinコード #802

hkurokawa opened this issue May 5, 2019 · 2 comments
Labels
Milestone

Comments

@hkurokawa
Copy link

https://android.jlelse.eu/common-code-smells-in-kotlin-57684429e9e

どれもあるあるで頷きながら読みました。

@hkurokawa hkurokawa added this to the 66 2019-05-05 milestone May 5, 2019
@hkurokawa
Copy link
Author

人によっては首肯しかねるものもあるかもしれませんが、自分の経験上はおおむね同意でした。とくに「!!を回避しようとしすぎる」は自分もよく目にするコードで、後段にある mapNotNull のような関数を使うか、さもなければクラッシュさせる方がよいと思います。

@yshrsmz
Copy link
Member

yshrsmz commented May 5, 2019

まず標準ライブラリの熟読が必要ですね 😇
自前でやってたけどよくよく調べてみたら標準ライブラリにあった、とかたまにありますw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants