xsl-list
[Top] [All Lists]

Re: [xsl] except (was: Keys with duplicates should be simple)

2014-02-03 01:10:21
On Mon, Feb 3, 2014 at 6:40 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:

I don't want to have to read the spec to verify that except is in
fact a set difference operator so I'd just rather not use it.


I'm afraid that when people write code purely by trial and error, there's not 
much we can do to help them.


Do you think that people see union and intersect and say... I better
read the spec before I use that.

Now what would be trial and error would be assuming that except has
the same semantic as difference. It's not something I'm prepared to
assume because my psyche says if it was a difference operator they
would have called it difference. That they have not means it must be
something else.

What can that something else be?

Must be the natural language interpretation we apply in common usage
(get me all the fruit except for the orange) - oops it's not that .

Then me no more trial and me no more error because me no more use.


We do try in the language design to avoid surprises, but we don't try to make 
it possible to write code by guessing the function names and operator symbols.


You can eliminate the guessing by sticking to the syntax of the domain
the concept derives from.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>