Re: playing around with dicts
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 14/12/2013, at 8:32 AM, Jan Wielemaker wrote:
> I think that dicts being allowed as clause head is more a coincident
> resulting from the fact that they currently are implemented as ordinary
> compound terms with a reserved symbol as functor. I think that should
> not be allowed. For one thing,
>
> person{name:john}
>
> is a different predicate than
>
> person{name:john, age:42}
Why is it? I would expect person{name:john} to match
any person{.....} as long as ..... included a name:john maplet.
I would expect person{name:john, age:42} to match any
person{.....} as long as ..... included a name:john maplet and
an age:42 maplet. That's how record patterns work in things
like F#.