Comments (4)
Hmmm. This appears to be due to how clojure.lang.RT/keys
is defined:
static public ISeq keys(Object coll){
return APersistentMap.KeySeq.create(seq(coll));
}
It takes all the entries, just to get at the keys. I can make the val lookup on each entry lazy, though, which I think is the semantically "right" way to give ourselves indirection. Thanks for pointing this out, I had completely missed this.
from potemkin.
No wonder I couldn't figure it out. I was looking at trunk, where I think keys
might have changed implementation. Stared at that for the longest time. Thanks.
Are you saying that the MapEntry
s that come back from seq
and entryAt
should overload val
and getValue
to lazily call valAt
?
from potemkin.
Yeah, that was my thought.
On Thu, Jul 10, 2014 at 12:38 PM, savagematt [email protected]
wrote:
No wonder I couldn't figure it out. I was looking at trunk, where I think
keys might have changed implementation. Stared at that for the longest
time. Thanks.Are you saying that the MapEntrys that come back from seq and entryAt
should overload val and getValue to lazily call valAt?—
Reply to this email directly or view it on GitHub
#23 (comment).
from potemkin.
Merged, sorry for the delay.
from potemkin.
Related Issues (20)
- Source for 0.3.13 HOT 2
- Macros define var even if not evaluated HOT 1
- Any chance of a version of import-vars that works for cljc? HOT 1
- Empty defprotocol+ bodies cause definition to not occur HOT 2
- Add examples for optional names to README
- Reconsider ClojureScript support? HOT 1
- Document how `import-vars` interacts with direct-linking and namespace reloading HOT 2
- def-derived-map has a broken hashCode if any key is nil HOT 3
- Metadata handling by `postwalk` in some cases
- Reliable JVM crash using definterface+ HOT 4
- wow, awesome naming! HOT 3
- def-map-type's predefined count doesn't run in constant time HOT 1
- Boxed math warning at unchecked-add
- Question: why so many ancestors difference betwence Clj map and a PotemkinMap? HOT 1
- Top-level namespace breaks jdeps analysis HOT 2
- docs: describe defprocotol+ HOT 9
- docs: add caveat about import-vars? HOT 2
- `def-map-type` breaks in namespaces that shadow core Clojure methods like `instance?`
- Potential breakage
- potemkin maps are `(instance? java.util.Iterator)` but clojure maps are not
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from potemkin.