<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Advanced compilation adds type hinting/checking which can be useful as a smoke test when compiling. &nbsp;It is laborious to implement the required comments to indicate types to the compiler, but once its in place it is pretty easy to continue using. &nbsp;It also adds some very complex rules for code optimization and variable replacements - my experience is that it can be very tricky to work with when converting existing code. &nbsp;I do not believe that it adds dynamic code loading, it might be work investigating require.js or some other commonjs module system.<div><br></div><div>I believe that closure has some code-quality checks, not sure if they are equivalent to JSHint or JSLint. &nbsp;I think it is a great idea to include, though. &nbsp;</div><div><br></div><div>Someone did some work converting a minimal set of code to work with the advanced compiler a while ago, that's probably in the list archives somewhere if we want to take a look at it. &nbsp;I think if we want to go this route, starting with the v3 overhaul is a great place because we can basically start from scratch and ensure that the API as a whole works with the advanced compilation settings from the beginning and add new stuff incrementally rather than starting with the extremely daunting task of reworking the entire existing code base.</div><div><br></div><div>Cheers</div><div><br></div><div>Paul</div><div><br></div><div><div><div>On 2011-11-07, at 11:05 AM, Tom MacWright wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I think it's worth a shot, though I'm kind of a newcomer to closure compiler - spending most time with uglify-js. I'd assume that the main benefit of advanced mode might be some kind of dynamic code-loading / externals concept? For code-quality, maybe we should take a look at JSHint or similar, as well?<br>
<br><div class="gmail_quote">On Sun, Nov 6, 2011 at 3:33 PM, Phil Scadden <span dir="ltr">&lt;<a href="mailto:p.scadden@gns.cri.nz">p.scadden@gns.cri.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
My 0.0002c. Should v3 be aimed at being usable with advanced compilation<br>
with the google closure compiler as well?<br>
<br>
Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
</div></div></blockquote></div><br>
_______________________________________________<br>Dev mailing list<br><a href="mailto:Dev@lists.osgeo.org">Dev@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br></blockquote></div><br></div></body></html>