作者AmosYang (LetMeGoogleThatForYou)
看板java
標題Re: [閒聊] import static 的好處?
時間Sat Sep 12 13:16:07 2009
※ 引述《PsMonkey (痞子軍團團長)》之銘言:
: 最近 trace 一些東西
: 發現有一些 project 也開使用 import static 了
: 嗯... 坦白說... 我不知道為甚麼要發明(引入?)這個語法耶
: (我甚至持反對的立場... [炸])
: 可以請各位開示一下嗎? Orz
本文的主題並不是討論引入 static import 結果是好是壞
以下主是要回應 "為什麼要引入 static import"
http://jcp.org/en/jsr/detail?id=201
static import 在這個 JSR 裡被提出,
在這個 JSR 裡有以下兩個問題的的答案
2.3 What need of the Java community will be addressed by the proposed
specification?
2.4 Why isn't this need met by existing specifications?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 65.87.177.87
推 PsMonkey:坦白說... 看了之後沒什麼用耶... Orz 09/12 13:55
→ PsMonkey:2.3 講的事情,我都感覺不到... [毆飛] 09/12 13:55
→ AmosYang:雖然11票有10票投YES; 但也都沒什意見/建議 09/12 14:57
→ AmosYang:static import有點像是躲在其他三樣功能裡混進去的 XD 09/12 15:00
→ AmosYang:除了JSR外…大概沒有別的更authoritative的參考文件了… 09/12 15:02