3 ms·
What is the representation for objects in the “name and arguments form” (eg enums in rust, variants in Haskell, other tagged/discriminated unions)? It seems lik
by dan-robertson 6y ago
What is the representation for objects in the “name and arguments form” (eg enums in rust, variants in Haskell, other tagged/discriminated unions)? It seems like they are becoming more popular in various programming languages.
What is the way to represent a map/dictionary where the keys are not strings? In json I also don’t have a good way except I guess a list of objects with a key and value field but it feels heavy. In Lisp I would probably use an alist (whereas a plist might be used for the “string” (or symbol, rather) keys). In fact, how does one even write a list of lists with this?