Re: Renaming map->dict, class->type?

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 11/25/2013 08:32 PM, Paulo Moura wrote:
> Hi Jan,
> 
> On 25/11/2013, at 19:43, Jan Wielemaker <[email protected]> wrote:
> 
>> Hi,
>> 
>> 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.
> 
> I find "dict" a better and more descriptive name. But what's common
> naming practice in other languages that provide built-in support for
> this kind of structures?

I don't know all of them.  Python calls them dict.  Javascript
calls them object, but they do much more.

>> 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"?

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?

	Cheers --- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.