;

April 16, 2012

bootstrap-dropdown.js clearMenus() needs ; at the end 這個bootstrap的issue可能是因為Douglas Crockford 跑來說:

That is insanely stupid code. I am not going to dumb down JSMin for this case.

引來多人圍觀(?),結果有了上百個回應在論戰要不要加分號。

不過最終Douglas Crockford 還是有修正 JSMin的bug:

JSMin/commit/5ca277ea452beae1c25db3bc0ef5c81309a3daf4#jsmin.c

bootstrap則是早在issue貼出之前就用改變寫法(沒加分號)的方式,所以是皆大歡喜吧,可喜可賀。

我是覺得bootsrtap很明顯的是用npm的coding-style,不是隨便不加分號的,要來要求作者加分號實在沒什麼意思。