Advanced compilation adds type hinting/checking which can be useful as a smoke 
test when compiling.  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.  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.  I do not believe that it adds dynamic code 
loading, it might be work investigating require.js or some other commonjs 
module system.

I believe that closure has some code-quality checks, not sure if they are 
equivalent to JSHint or JSLint.  I think it is a great idea to include, though. 
 

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.  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.

Cheers

Paul

On 2011-11-07, at 11:05 AM, Tom MacWright wrote:

> 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?
> 
> On Sun, Nov 6, 2011 at 3:33 PM, Phil Scadden <p.scad...@gns.cri.nz> wrote:
> My 0.0002c. Should v3 be aimed at being usable with advanced compilation
> with the google closure compiler as well?
> 
> 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.
> 
> _______________________________________________
> Dev mailing list
> d...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
> 
> _______________________________________________
> Dev mailing list
> d...@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev

_______________________________________________
Dev mailing list
d...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-dev

Reply via email to