sandbox
sandbox copied to clipboard
showel.js - result: util.inspect( result ) - why?
The resulting object is formed as:
{ result: util.inspect( result ), console: console } )
Why? I suppose it breaks the semantic: why to add additional quoting for the result at that level of abstraction (the more - with util.inspect, which is usable for debugging purposes, not for serialization)?
Dmitry this is under large discussion on issue #8, we are redoing a fair bit and will add a better serializer, right now it is that way due to circular references, we are moving to fork and adding circular reference support. Functions will still be stripped.
On Tue, Jan 24, 2012 at 10:22 AM, Dmitry Koterov [email protected] wrote:
The resulting object is formed as:
{ result: util.inspect( result ), console: console } )
Why? I suppose it breaks the semantic: why to add additional quoting for the result at that level of abstraction (the more - with util.inspect, which is usable for debugging purposes, not for serialization)?
Reply to this email directly or view it on GitHub: https://github.com/gf3/sandbox/issues/16
I suppose you should improve the serializer (and possibly deserializer at the caller side) around the whole
{ result: result, console: console }
construction, not around the result only! I am talking about that. Why additional quoting for one of inner fields?..
It will be transparent in the future; it is currently stringified for the reasons above.
Might be nice to update the docs to reflect this, at least. The weird serialization kind of hit me out of left field