Re:The Story of Google's Closure: Advanced JavaScript Tools
by barrkel on Monday November 09, 2009 @02:49AM
(#930572)
I find this whole Closure story amusing, because what it amounts to is applying static typing techniques to a dynamic language - and guess what, static typing makes "it easier to catch errors much earlier". Where are the dynamic typing extremists when you need them?
[ Parent
| on HN ]
Re:The Story of Google's Closure: Advanced JavaScript Tools
by yuan on Monday November 09, 2009 @08:11AM
(#930815)
I don't remember seeing any "dynamic typing extremists" who would argue that static typing is totally worthless, just that it has cost (e.g., it's an additional concern for the programmers) too in addition to the benefits it provides, and there are often times and cases where the cost dwarves the benefits. I do see static typing advocates who would argue that static typing should be everywhere, at all time, and non-optional.
To the extent that a single case can prove anything, what is being done here in fact strengthens the case for dynamic typing, for it shows that a dynamic language can reap the benefits of static analysis too, WHEN it is beneficial.
Re:The Story of Google's Closure: Advanced JavaScript Tools
by jganetsk on Monday November 09, 2009 @10:04AM
(#930988)
To the extent that a single case can prove anything, what is being done here in fact strengthens the case for dynamic typing, for it shows that a dynamic language can reap the benefits of static analysis too, WHEN it is beneficial.
You don't know that dynamic typing + static analysis is better than just static typing. Closure definitely does not catch everything. Hell, even just using the [] operator on a non-array object, Closure breaks down.