Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's the other way around, actually. If you define a map as a list, it will have none of the properties of a map: you can't lookup a key in constant time.

But if you start with maps, then you can represent a list as a special case of a map in which the keys are integers that get incremented, starting at 0.



GP isn't talking about the runtime implementation but rather the serialization format. You can serialize a map as a list. Therefore, a hypothetical Lisp-like language based around maps could simply end up consisting of lists that contain key value pairs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: