Re: PIZZA time again :-)

From: mAsterdam <mAsterdam_at_vrijdag.org>
Date: Wed, 07 Sep 2005 19:09:04 +0200
Message-ID: <431f1e40$0$11072$e4fe514c_at_news.xs4all.nl>


David Cressey wrote:

> mAsterdam wrote:
> 

>>Assume
>>1. there is a meaningful (or at least consequential)
>>difference between:
>>
>>toppings([salami, mozarella, onions]).
>>and
>>toppings([mozarella, onions, salami]).
>>
>>2. A, B, C are lists (conforming to the as yet to
>>be published Spight LIST grammar in relational context).
>>
>>What should
>>merge ([A,B], C). % merge list of lists into list
>>mean ?
>>
>>I think it should merge A and B into C,
>>preserving order, and fail if it can't.
>>
>>Or, if merge(+, +) just fail if C isn't a merge.
>>
>>(google for C3, Dylan, Perl)
>>
>>(clp - sorry for bothering you :-)
> 
> 
> Off topic:  I have always assumed that the toppings on a pizza form an
> (unordered) set, that
> 
> 

>>toppings([salami, mozarella, onions]).
>>and
>>toppings([mozarella, onions, salami]).
> 
> will use exactly the same ingredients,  prepare and cook exactly the same
> way,  cost exactly as much, and taste exactly the same.  I would be VERY
> surprised if Domino's had a different opinion.

Asuuming they don't, I wonder if this was a deliberate decision to keep things simple.

> And that brings me back to the topic:
> 
> You can ALWAYS represent a set as if it were a list,  by simply presenting
> the elements in an arbitrary order.  You can ALWAYS represent a list as if
> it were a set,  by including an attribute that marks each element's position
> in the list.

How are you going to do that in our hypothetical PIZZA ordering system? It is, I suspect, a non-trivial excersize if we want the user not to notice the implementation.

> The question is not WHETHER the above can be done. The question is WHEN it > SHOULD be done.

And WHY - and if it can be prevented. Received on Wed Sep 07 2005 - 19:09:04 CEST

Original text of this message