Re: PL: how a perl programmer might do datatypes in RDF

Graham Klyne wrote:
> 
> Dan,
> 
> I think that's a reasonable and consistent answer, but I'll note that's not
> what Perl does.

no? perl's == is exactly sameNumber, no?
== is not the identity relation. you can tell $a and $b apart using eq;
they're distinguishable, and hence not identical.

> The following script:
> 
> #!/local/bin/perl
> $a="10";
> $b="010";
> $c=10;
> if ( $a==$b )
>      {
>      print "Equal '$a', '$b', '$c'\n";
>      }
> else
>      {
>      print "Not equal '$a', '$b', '$c'\n";
>      }
> 
> prints:
>      Equal '10', '010', '10'
> 
> I suppose that you could argue that '==' invokes a higher level of
> interpretation.

== is an equivalence relation on perl scalars.

> #g
> --
> 
> At 10:50 AM 12/6/01 -0600, Dan Connolly wrote:
> > > I think the issue of "10" vs "010" needs to be clear -- you seem to be
> > > proposing that these ares distinct scalar values.
> >
> >yes; they are distinguishable in all interpretations.
> >
> > >  But under what
> > > conditions does:
> > >
> > >      X foo "10" .
> > >
> > > entail
> > >
> > >      X foo "010" .
> > >
> > > ?
> >
> >it never RDF-entials nor RDFs-entials.
> >
> >However, in stuff layered on top of RDF/RDFS,
> >if you added more axioms about foo... say, that
> >         ?x foo ?a
> >         ?a sameNumber ?b
> >implies
> >         ?x foo ?b
> >then you would get that conclusion.

-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Friday, 7 December 2001 14:55:47 UTC