3 ms·
A big addition that json is missing a distinction for, which Ron has is the notion that hashmap and record/struct type are different. Hashmaps, you don't necess
by habitue 4y ago
A big addition that json is missing a distinction for, which Ron has is the notion that hashmap and record/struct type are different. Hashmaps, you don't necessarily know what all the keys are. Structs, you know the keys and what type each key should be.
- mjburgess 4y agoMoreso that semantically hashmaps are collections and structs arent. Structs are single items with a fixed number of properties.
- cies 4y agohashmap's a collection type, record/struct is a product type (tuple is another product type), many miss the sum type (incl JSON) sadly. JS conflating the hashmap and record/struct is a big loss, probably fixed by TS. it does show JS's dedication to its radical dynamic typing discipline (or lack thereof).