compactdict

A compact dictionary implementation

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-22 05:28

Installation

nimble install compactdict
choosenim install compactdict
git clone https://github.com/LemonBoy/compactdict

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
compactdict - - - - - - -

Source

Repository https://github.com/LemonBoy/compactdict
Homepage https://github.com/LemonBoy/compactdict
Documentation View Documentation
Registry Source nimble_official

README

CompactDict

A compact dictionary implementation kindly borrowed from Python.

Features

  • The insertion order is preserved
  • No need to initialize the Dict object before using it
  • More memory efficient for small & medium sized collections
  • Same API as stdlib's Table

Examples

var x = {"foo": 1, "bar": 2}.toDict()
echo x["foo"] # prints 1
for k, v in x.pairs():
  echo k, " = ", v # prints "foo" = 1 and "bar" = 2