On 4/15/2011 5:09 AM, Asen Bozhilov wrote:
John J Barton:
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.
In that case shouldn't be call `getInspectorVars` when the HTML has
been showed? It is really questionable how this design is the best
approach.
That is what this code does, it calls getInspectorVars only if the HTML
panel has been used.
Wait! If the language can fix my mistakes then I'm definitely all for it!
The existential operator reminds me for PHP `@` operator. Over two
weeks ago I have to deal with PHP application, which should be moved
on another server. When I moved the application to the new server I
got simply white screen as output of my browser. I was walking trough
the included files and I found in `db.php` a line:
@mysql_pconnect();
It was coded if mysql_pconnect does not return value which can be
converted to true to die the script.
Then this example is not related to the issue being discussed. In the
issue being discussed, the caller already knows that the result can be
'undefined' and that any call in the chain may result in 'undefined'.
Other cases are already supported.
The time for debugging that was over 1 hour and the problem was that I
haven't got installed mysql library. I really don't want to debugging
such a code.
As in the other example, syntax can't fix bugs.
Personally if I have to use the existential operator I will start
thinking about better design for my application.
I don't think anyone proposes make this operator mandatory.
jjb
Regards.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss