question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Native Map Type

See original GitHub issue

Someone recently commented on an old Ramda issue about supporting the native Map type and it got me thinking whether we should do so in Sanctuary. I’m not quite sure how that would look given that the StrMap type we have is more specific that the general JS type but I’m interested to hear everyone’s thoughts.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
scott-christophercommented, Oct 24, 2016

I’ve pushed some code to https://github.com/sanctuary-js/sanctuary-set/tree/pre-0.0.1 which contains an initial pass of implementing two variants of immutable sets, one based on balanced AVL trees and the other is specialised for Int32 values using Patricia tries. It is severely lacking in documentation and the code could do with a good clean-up and sanity check, though I figured it would be good to get some eyes over it sooner rather than later.

I’ve also got some Map versions of the same implementations which I’ll tidy up a bit over the coming days and push up to the other repository.

3reactions
scott-christophercommented, Sep 18, 2016

Is there a reason we cannot use a similar approach for externally visible maps and sets in Sanctuary?

The only issue I see is that we would probably want to treat it as an immutable structure, which will end up with a bunch of instance cloning to work around the underlying mutable structure.

I’ve a got a bit of time free over the next week or two and was already looking at implementing some persistent Map and Set types to get a better understanding of a paper I saw recently, so providing that goes to plan they could potentially live under the Sanctuary banner if there’s interest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Map Types | Maps JavaScript API - Google Developers
This document discusses the types of maps you can display using the Maps JavaScript API. The API uses a MapType object to hold...
Read more >
React Native Map components for iOS + Android - GitHub
var MapView = require('react-native-maps');. This MapView component is built so that features on the map ( ...
Read more >
Indian Maps, Mapping, and Geographic Knowledge - Native ...
Use our online form to ask a librarian for help. Indian Maps, Mapping, and Geographic Knowledge.
Read more >
@types/react-native-maps - npm
This is a stub types definition. react-native-maps provides its own type definitions, so you do not need this installed.
Read more >
Native Map - GpsGate Support
Native Map is an in-house map service based on OSM (Open Street Map) data. It supports the whole planet and also gives all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found