koji 積分 2 編輯於

但大概能理解,能用現存語法解決的地方,實在沒必要加個新的語法定義,除非真的效益差太多了。

這是文章的子討論串,你可以回到上層查看所有討論和文章
koji 積分 1 編輯於
啊,下一段就這樣寫了XD

Much of the benefit of collection literals can be gained by providing library APIs for creating small collection instances, at significantly reduced cost and risk compared to changing the language. For example, the code to create a small Set instance might look like this: