News for hackers. Stuff that matters.
Re:Facebook Launches Flow, Static Type Checker for JavaScript by alkonaut on Tuesday November 18, 2014 @02:17PM (#8625720)
How does static checking work with dynamic types? Can the type checker figure out if a field/method exists on a type given that it can be added dynamically?

Edit: I assume it just checks bool/number/string and doesn't care about prototypes?

Re:Facebook Launches Flow, Static Type Checker for JavaScript by avik on Wednesday November 19, 2014 @06:24PM (#8633376)
It does care about prototypes. So it checks for inconsistencies between methods added to a prototype and their uses. The tradeoff is that for dynamically added properties, it doesn't always remember where they are defined and where they remain undefined (it knows they are defined "somewhere").