jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IvanLatysh <i...@yourmail.com>
Subject Re: 3.1.3.1 Removing Items
Date Mon, 23 Jul 2007 21:04:27 GMT
Roy T. Fielding wrote:

> The null type is just a language gimmick to bypass strong typing.
> It does not exist in the data model.
That's ... interesting.
I am interesting what James Gosling will say on that, will definitely ask him 
about.

> Again, language gimmicks to bypass strong typing.  
Null is a type and it is enforce strong typing.

 > They have no relevance to JCR.
Could you please tell us what JCR is stand for ?
And how it has no relevance to Java ?

> The fact that the symbol "null" can be converted to the data
> value of zero in an integer context has no relevance to a data model.
> What you passed is zero, not null.
First of all zero and null are 2 distinct values.

> Variables don't exist in data models.  Please, try to think of it terms
> of data that is exchanged between two different computers that have
> no shared memory.  The language concepts that you are talking about
> do not cross such a boundary and thus have no purpose in a data model.
In this particular discussion I think in terms of Java API !

But so far I can see anything else (C, Perl, etc) plus now it is an application 
network layer.

> Yes.  Make the date field an optional property.  If the property exists,
> then the field is present.  If not, then the field is absent.
Excellent, but how would user fill-up this `absent` field when we decide to?

> Well, first, you haven't assigned the value null -- you just assigned
> age a value of 0.  The XML is showing it as an empty string (an empty
> element has value = "") and you translate that to null (for no apparent
> reason), convert that to a data value of Integer 0, and then assign it
> to age.  Writing that back out would be the same as if the value had
> been given as <value>0</value>, which isn't the same thing unless we
> assume application knowledge about infants not being in contacts.
> There are at least two or three errors in that line alone.
> A sane implementation would check the string value for
> an integer and exclude the age property if the value is invalid.

> There might be some argument for using null within the query
> model as a synonym for "name doesn't exist".  For example, instead
> of checking for both ((name doesn't exist) or (name == default)),
> it might be faster to check for (name == (null or default)).
> Allowing null as a property value would prevent such a language
> feature from being used within the query model.
I will rest my case here.

-- 
Ivan Latysh
ivan@yourmail.com

Mime
View raw message