<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2"><div><br></div>Wow, that IS interesting. No process required, just modify /horizon/doc/source/contributing.rst and submit a patch.<br><br><font color="#990099">-----Matthew Farina <matt@mattfarina.com> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;">To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev@lists.openstack.org><br>From: Matthew Farina <matt@mattfarina.com><br>Date: 01/14/2015 12:20PM<br>Subject: Re: [openstack-dev] [horizon] function expressions vs function declarations in JavaScript<br><br><div dir="ltr"><div><div>Thai, I'm still poking around at JavaScript things and did a little testing on function declarations vs function expressions. Seems Firefox is faster with function expressions by quite a bit at parse time. For reference see <a href="http://jsperf.com/mfer-function-types">http://jsperf.com/mfer-function-types</a>.<br><br></div>I'm not suggesting what we do. I'm just sharing a data point I found surprising.<br><br></div>I'm curious about the process for proposing changes to <a href="https://wiki.openstack.org/wiki/Horizon/Javascript">https://wiki.openstack.org/wiki/Horizon/Javascript</a>. Is there any process?<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 14, 2015 at 1:15 PM, Thai Q Tran <span dir="ltr"><<a href="mailto:tqtran@us.ibm.com" target="_blank">tqtran@us.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif"><div><br></div>It was definitely an interesting the read, I never really noticed the subtle difference. Since then I have also read a few other thoughts on it.<div>For me, function declarations can get convoluted very fast if not use correctly.</div><div>Surely, you should never define functions inside of an if statement, and quite confusing to do it after a return statement.</div><div>But they do have their uses when used correctly.</div><div>I think it ultimately depends on what you are trying to do and whether it make sense to use declarations vs expressions.<div>As long as people understand the difference, and take it case-by-case, its not really something I'm going to mull over too much.<br><br><font color="#990099">-----Matthew Farina <<a href="mailto:matt@mattfarina.com" target="_blank">matt@mattfarina.com</a>> wrote: -----</font><div style="padding-left:5px"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px">To: "OpenStack Development Mailing List (not for usage questions)" <<a href="mailto:openstack-dev@lists.openstack.org" target="_blank">openstack-dev@lists.openstack.org</a>><br>From: Matthew Farina <<a href="mailto:matt@mattfarina.com" target="_blank">matt@mattfarina.com</a>><br>Date: 01/14/2015 07:04AM<br>Subject: [openstack-dev] [horizon] function expressions vs function declarations in JavaScript<div><div class="h5"><br><br><div dir="ltr"><div><div>JavaScript has multiple ways to deal with functions. There are function declarations and function expressions (and named function expressions).<br><br></div>In looking at some reviews and the current code I found some inconsistencies which leads me to ask, is there any guidance for handling this in Horizon? I noticed no documentation in <a href="https://wiki.openstack.org/wiki/Horizon/Javascript" target="_blank">https://wiki.openstack.org/wiki/Horizon/Javascript</a>.<br><br></div>Thanks,<br>Matt<br><br><br></div>
</div></div><div><font face="Courier New,Courier,monospace" size="3">__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></font></div></div></div></div></div></font>
<br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>
<div><font face="Courier New,Courier,monospace" size="3">__________________________________________________________________________<br>OpenStack Development Mailing List (not for usage questions)<br>Unsubscribe: OpenStack-dev-request@lists.openstack.org?subject:unsubscribe<br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br></font></div></div></div></font>