[openstreetmap-website] Port to Leaflet (#121)
Vladimir Agafonkin
notifications at github.com
Mon Nov 5 12:52:10 GMT 2012
> @@ -1,265 +1,204 @@
> -var epsg4326 = new OpenLayers.Projection("EPSG:4326");
> +// Leaflet extensions
> +L.LatLngBounds.include({
jQuery is comparable, because this "documented extension point" is [just a shortcut](https://github.com/jquery/jquery/blob/master/src/core.js#L84) to `jQuery.prototype`, extending which adds methods to instances of jQuery class (with an infinite potential for conflicts).
Sure, these things could be rewritten as functions to prevent possible collisions in future, but this also removes some convenience and readability of code, so one should compromise. Given the nature of introduced methods, I doubt they could ever cause any conflicts.
Once again, I can see how rude it might look in a static language environment, but this approach is very common for dynamic languages.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/121/files#r2028915
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121105/9c75d877/attachment.html>
More information about the rails-dev
mailing list