3 ms·
> You should have seen the vacant look on his face when we tried to explain a very simple closure. Advanced indeed... Being able to describe a closure is only
by dpcx 15y ago
> You should have seen the vacant look on his face when we tried to explain a very simple closure. Advanced indeed...
Being able to describe a closure is only valid if you've had reason to use them before. Sure, use of jQuery pretty much implies use of closures, but in general, lack of specific knowledge within a domain does not imply lack of knowledge in the domain.
- jeltz 15y agoI would say any real use of JavaScript does imply use of closures. For example most frameworks and any use of AJAX requires them to be used.
- dspillett 15y agoA fair point: you can get by without them completely for many tasks, or with them but not actually knowing you are using them (and/or what to call them) because you've not needed to understand the implications in detail (i.e. you might pass out an inner function and merrily call it, or hand a function that uses state outside its internal scope to some library, without knowing that these are closures). But to not be able to grasp it at all when explained (he wasn't being asked to describe them from his own understanding), definitely marks "javascript: advanced" as an exaggeration far too far IMO. To be honest I wasn't being really fair with the closure thing. I should have not proceeded as we'd already left his safety zone long before that point. Anonymous functions were alien to him, and I'm not sure he was even comfortable with the idea of functions being entities that you could pass around at all (i.e. do anything with other than define and call). To put is simply: I considered his level of knowledge/experience to be no better than basic, perhaps not even that, unless you count having copied and pasted some more advanced code samples, and his CV claimed "advanced". And not recognising jQuery(document).ready() or any of its shorter equivalents made his level of anything with jQuery "none" rather than "intermediate" claimed (making that an flat out lie instead of just a gross exaggeration).