> It simply adds a layer of seperation in the code that I am fond of. And it > does > allow implementation of different presentations easily, which may well be good > for example for implementing stealthy versions of FNP that look like HTTP or > whatever. And while the testbed is not a big a deal, it certainly makes it > easier if I can plug in a simple binary serialization as the presentation in > it, so as to make it easier to hunt bugs in the message propogation. > > And the thing is, you keep saying that quoting the strings or any other way of > typing the fields is so complex, but you have yet to say why this is so. Sure, > if you quote strings you have to escape the quote char, but we currently have > to escape newline somehow, so what is the big deal? And there have even been > alternative suggestions, but a mark before numbers and booleans to mark they > are values, or put one char which marks the type beofre the value, but you > have > rejected them all.
Fair enough; I'm hesitant to quote strings because in my experience, quotes appear in strings far more often than newlines do, and I don't think most of our strings will require newlines. Secondly, I think different kinds of strings may want different encodings, so I would leave that up to the high-level code rather than specifying it. Some fields, for example, may be complex structures themselves that encode and decode themselves from strings in a way that suits them--and these methods will have to call external methods to de-quote first. OK, so weak typing doesn't complicate things beyond all hope, and your example of "stealthifying" a Freenet message using knowledge of field types is the first one I've heard that makes some sense (although even that's pretty slim--you still have to treat unknown text fields anyway, and you still have to store the full name of every field in case it has been subclassed, so you might as well do all of them with that same code). I suppose a lot of my problem is also just the philosophical one that fields are already strongly typed, and adding this weak typing info may actually conflict or at least confuse. And it makes creating the message object more compex, because these types must be stored in addition to the strings. -- Lee Daniel Crocker <lee at piclab.com> <http://www.piclab.com/lee/> "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
