-1

Since the underscore is an acceptable char to variable/attribute
names, you would surely end up with unwanted type coercions... if a
developer chose "_int" for the last part of the attribute, it would
force coercion to integer... which you cannot be sure it's what he/she
wanted in the first place.

If this is really an issue (I'm still unconvinced it is), you need to
find another way of *explicitly* doing this.

For example:

location : {
   latitude: { type: 'xsd:float', value: '45.4' },
   longitude: 45
}

in this case it would specify:

lat: 45.4 (float)
long: 45 (int)
(since longitude opts for an implicit type specification)


--
André Luís
http://id.andr3.net/

On 4 June 2010 05:27, Harshad RJ <harshad...@gmail.com> wrote:
>
> On Fri, Jun 4, 2010 at 9:41 AM, Harshad RJ <harshad...@gmail.com> wrote:
>>
>> Suggestions for data-types:
>> int : Integer
>> float : Floating point number
>> url : A well formed URL
>>
>
> To add to this list of data-types:
> str: To force to a string
>
> Say, you have an attribute whose label ends with _int. So to force it to a
> string you could append _str.
> For example:
>
> "xyz_int_str" : "Some string"
>
>
> --
> Harshad RJ
> http://hrj.wikidot.com
>

Reply via email to