Andy,

Not "equals" but "equalTo".  Does your point still hold for equalTo?

Claude

On Thu, Nov 23, 2017 at 10:18 AM, Andy Seaborne <[email protected]> wrote:

>
>
> On 22/11/17 21:27, Claude Warren wrote:
>
>> I think equalTo for ElementData is not correct.  Given 2 ElementData
>> instances
>>
>> ElementData 1:
>> {noformat}
>>
>> VALUES ( ?x ?v ) {
>>    ( "three" <one> )
>>    ( "four" <two> )
>> }
>>
>> {noformat}
>>
>> ElementData 2:
>>
>> {noformat}
>>
>> VALUES ( ?v ?x ) {
>>    ( <one> "three" )
>>    ( <two> "four" )
>> }
>>
>> {noformat}
>>
>> shouldn't the equalTo() method return true.
>>
>> Currently it is sensitive to the ordering of the vars.
>>
>> I can put a fix in but I want to be sure that there is an error first.
>>
>
> It's not an error.
>
> Element* are syntax. and ".equals" is a syntax test, not a semantic test.
> The variables are in a different order and in synatx that is significant.
>
> This is true throughout the abstract syntax provided by Element*.  There
> are lots of ways to write "the same" query.  .equals means "same abstract
> syntax".
>
> Try "qparse" - it always checks the query round-trips as well as printing
> it.
>
>         Andy
>
>
>> Claude
>>
>>


-- 
I like: Like Like - The likeliest place on the web
<http://like-like.xenei.com>
LinkedIn: http://www.linkedin.com/in/claudewarren

Reply via email to