logoalt Hacker News

ZoomZoomZoom • today at 9:59 AM • 1 reply • view on HN

I suspect you're talking about heterogenous containers which are antithetical to a strongly typed language but nevertheless are supported via std/json's JsonNode dynamic data.

In Nim regular hash maps (called tables here) have pretty regular accessors via `[]` `[]=` overloads (`foo["frob"]=42`), plus additional routines such as `.get(otherwise)`.

https://nim-lang.github.io/Nim/tables.html

Don't know why are you conflating objects in your question.


Replies

jphoward • today at 10:03 AM

I'm 'conflating' them because they're called objects in javascript, so people unfamiliar with Python know what I mean. Ok thanks.

➕ show 1 reply