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

新手嘗試重構 #7

Merged
merged 7 commits into from
Nov 21, 2022
Merged

Conversation

frankvicky
Copy link
Contributor

Vincent 大大晚安,我嘗試重構了 emoji-jvm-string 的專案,主要是將原本 main 方法拆分成三部分,並將這三者分別開成 class:

  1. 讀取:EmojiReader
  2. 過濾:ValidEmojiCollector
  3. 寫入:EmojiFileCreator

另外就是將一些函數替換成 (我自己判斷) 更有語意的函數來呼叫,功能完全不變;我也嘗試實作 extension function,希望可以讓閱讀程式碼上能夠更流暢。
由於我 Kotlin 還在學習,感覺是班門弄斧,如果有甚麼地方可以做得更好請多指教 😺
非常感謝

祝你有美好的一天!

@Jian-Min-Huang
Copy link
Member

不用客氣 🙂

我大概拉下來跑了一下,結果看起來是對的,讚 👍

看來你很快就看懂我在寫什麼鬼東西 XDD

有些 style 小地方我們可以討論一下

if (line.startsWith("# subgroup: ")) flag = true
}
}
return lines
Copy link
Member

Choose a reason for hiding this comment

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

同上,How about lines.toList()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

同上 😺

@Jian-Min-Huang Jian-Min-Huang added the enhancement New feature or request label Nov 20, 2022
@frankvicky
Copy link
Contributor Author

Vincent 大大早安,我剛剛依照你的 review 再做了一些重構,再麻煩妳看看 😺

祝你有美好的一天

@Jian-Min-Huang
Copy link
Member

LGTM, Let's merge.

@Jian-Min-Huang Jian-Min-Huang merged commit c437d68 into taiwan-kotlin-user-group:main Nov 21, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants