siuying 積分 1 編輯於

這次改變1 重點真不是方法長短 :

-public func readLine(stripNewline stripNewline: Bool = true) -> String?

+public func readLine(strippingNewline strippingNewline: Bool = true) -> String?

這是文章的子討論串,你可以回到上層查看所有討論和文章
IngramChen 積分 0

感謝回應。

我了解了,長名稱的詛咒還是沒有消失。

siuying 積分 0

是詛咒或是祝福,視你的心情而定 :)

siuying 積分 0 編輯於

再舉一個例子:

[array appendContentsOf:@[@2, @3, @4]]; 變成 array.append(contentsOf: [2, 3, 4]) 重點是 Swift 化而不是縮短