3 ms·
Why do you miss dictionary literals? Syntax similar to arc's seems to do it for me: (obj a 1 b 2 c 3)
by akkartik 16y ago
Why do you miss dictionary literals? Syntax similar to arc's seems to do it for me:
(obj a 1 b 2 c 3)
- gruseom 16y agoWe do the same thing: (make :a 1 :b 2 :c 3) which macroexpands into a plist in CL and {a:1, b:2, c:3} in JS. I've grown to like this idiom a lot. Yeah, you have to type OBJ or MAKE or whatever but in return you get something that integrates completely smoothly with the rest of the language.
- metageek 16y agoY'know, I'm not sure. Next time I need to use a hash, I'll create something like that and see how it feels.