Re: Renaming map->dict, class->type?
Jeff Schultz <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 26/11/2013 06:41, Jan Wielemaker wrote: > On 11/25/2013 08:32 PM, Paulo Moura wrote: >> On 25/11/2013, at 19:43, Jan Wielemaker <[email protected]> wrote: >>> Just wondering, should we rename `map' into `dict'? The problem is >>> that we also have the `map' concept as in maplist/N, map_assoc/2,3, >>> etc. This will change the documentation as well as rename the map_* >>> predicates. Good point. "Map" shouldn't be overloaded. "Dict" will be familiar to many scripting language programmers. It does have strong imperative associations, though, which I think will encourage its overuse when better data structures are available. "Object" or maybe even "frame" might be better. >>> The second issue with maps that currently, in x{a:1}, 'x' is >>> called the `class'. That might be a too much object oriented term. >>> Would `type' be better? This term only appears in the >>> documentation. >> But words are overloaded :( I would prefer "type" over "class" for >> the same reason you state above. Maybe "kind"? But it's nothing like a "type!" Why would we say x{a:1} and x{b:c} have the same type? Isn't it just a "tag?" > Maybe right. At this moment, `type' isn't a very important concept > in Prolog, but surely we would like to keep the option open to > change that. I'm not against "kind", especially if there is a > precedent. Does anyone know that? I'm used to kinds as "types of types." Much prefer "tag." Jeff Schultz