On Tue, 09 May 2000, Lee Daniel Crocker wrote: <> > Yes--quoting is gross, and that part of the spec is the most solid and > complete of any, thanks to lots of debate and feedback. All field values > are strings, period. Unicode values 0x0020..0xFFFF. If some function > wants to interpret one as a number, it should fetch the string and do > the conversion itself. I have no objection if you want to add convenience > methods to the FieldSet object for getInteger() or getHex() or whatever, > but quoting is ugly, error-prone, and unnecessary. It adds comlexity > without adding any functionality at all.
The issue is when you attempt to copy the data from one FieldSet to another. For example, all the fields in the subset "storable" are stored in the DataProperties with the data (DataProperties does not implement fieldset right now, but it should). Obviously the node should copy the contents of the Storable sub fieldset from the messsage to the DataProperties. But if it can't tell by itself whether something is a string or a value, then it can't do that. Sure, it could just copy everything as strings (this is what it does now), but then DataProperties will see the internal value representations of the specific transport in use (hex for numbers, "true" and "false" for booleans) which is a breach of closure. The problem is of even bigger concern if we use several transports at once, like Brandon wanted to attempt. In that case I don't see any way around it but making it possible to read the type within the protocol (because you want to be able to copy fieldsets from one transport to another, possibly with completely different ways of representing values). If we are against quoting strings, we could add a mark at beginning of fields that contain values instead (Since true and false can't be read as hex strings) and have the same result. Of course, then strings would not be allowed to start with this, but it could be escaped (as we have to escape newline as it is). > -- > Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lcrocker.html> > "All inventions or works of authorship original to me, herein and past, > are placed irrevocably in the public domain, and may be used or modified > for any purpose, without permission, attribution, or notification."--LDC > > > _______________________________________________ > Freenet-dev mailing list > Freenet-dev at lists.sourceforge.net > http://lists.sourceforge.net/mailman/listinfo/freenet-dev -- Oskar Sandberg md98-osa at nada.kth.se #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/) _______________________________________________ Freenet-dev mailing list Freenet-dev at lists.sourceforge.net http://lists.sourceforge.net/mailman/listinfo/freenet-dev
