Closed tmcw closed 12 years ago
I'd consider aliasing it routinely in your app and see what sticks. e.g. I regularly do var MM = com.modestmaps
in my app code. Sometimes I even copy all the com.modestmaps members to window with a quick for-in loop.
There needs to be something because e.g. Point
, Location
, Coordinate
, Transformation
, Projection
and Map
are all too generic for Modest Maps to claim in the global namespace. Is MM
rare enough?
But yeah it could go away harmlessly - we could even make a com.modestmaps
alias of whatever we choose.
I think MM
sounds good. I checked out the source to $.noConflict and it looks unobtrusive enough (albeit reliant on the browser... we'd have to improve that) that we could go for a concise namespace and never totally clobber other tools that take MM
.
Underscore has a similar feature, it's a tiny function and just a matter of saving the previous MM before creating your own.
On 5 May 2011 16:56, tmcw reply@reply.github.com wrote:
I think
MM
sounds good. I checked out the source to $.noConflict and it looks unobtrusive enough (albeit reliant on the browser... we'd have to improve that) that we could go for a concise namespace and never totally clobber other tools that takeMM
.Reply to this email directly or view it on GitHub: https://github.com/stamen/modestmaps-js/issues/26#comment_1108905
+1 for MM as well - it's concise and it's what I end up actually using all the time anyway.
Fixed in a905543d12ee0ea2bfef933d137d0677d0191269
Okay, this one's up for debate, it's just something that's been bugging me:
The
com.modestmaps
convention in this naming (which polymaps inherited), seems to be a narrowly Flash (and I suppose Java) idiom, not seem elsewhere in Javascript. Could the library eventually move to simplymodestmaps
?