simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

Weird condition in Cache.js #123

Closed ghost closed 12 years ago

ghost commented 12 years ago

There is an assignment used as a condition at https://github.com/simplegeo/polymaps/blob/master/src/Cache.js#L15 which might cause hard to spot syntax issues.

ghost commented 12 years ago

Is there a reason for closing the issue without even giving a comment?

mbostock commented 12 years ago

I closed the issue because you were commenting on the coding style rather than reporting a defect.

Polymaps is not being actively maintained by anyone at the moment. I may take another look at slippy maps in conjunction with D3 (read this thread), but I don't know when.

Re. the style: While you are right that it does risk being misread, it's also valid JavaScript, correct, and shorter than writing it some other way. Occasionally I like to write code as concisely as possible, sometimes at the expense of readability simply because it is fun. You may disagree with that for good reason—taken too far, it's a bad habit. But within reason, it's also good to have JavaScript libraries as small and fast as possible.