Asen Bozhilov wrote:
Dmitry A. Soshnikov:

  
which in sugar form is:

var vars = context.getPanel?("html", true).getInspectorVars();
    
I don't think this is real use case. It seems like a design mistake.
Why would you check for existence  "html" panel? If the "html" panel
does not exist in the Firebug something will be wrong in the whole
application. With code like this, they will need more time to debug
and fixing.
  
The HTML tab you see in the Firebug tab set is just a picture, there is no real HTML panel.

All of Firebug's panels are actually <div> elements allocated on demand. So the code above is saying:

   If the user has ever used the HTML panel in debugging this web page, then get the inspector vars.

This lazy-construction is widely used in Firebug, as I mentioned before.
Maybe I am missing something, but existential operator will solve some
design mistakes. I don't think that the language should fix script
authors mistakes.
  
Wait! If the language can fix my mistakes then I'm definitely all for it!

Seriously though, I think dynamics in _javascript_ takes time to appreciate, especially if you come from a language with a strongly static mindset.

jjb
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to