[e-lang] deJSONKit may be misnamed. Please discuss.
Kevin Reid
kpreid at mac.com
Wed May 27 21:43:28 EDT 2009
What deJSONKit does is map all of JSON to some of Data-E. This --
http://wiki.erights.org/wiki/Data-E_in_JSON
is a map of some of JSON to all of Data-E (which I am going to be
using in my Caja-CapTP project). What, then, should the Data-E kit for
this be called?
The original Data-E kits are as follows:
Kit Type; Language
============= ==========================
deAssemblyKit String; human readable 'assembly' for Data-E bytecode
deASTKit Term-tree; An AST for Data-E
deBytecodeKit Byte array; bytecode designed for Data-E
deENodeKit ENode; E program AST corresponding to Data-E
deSrcKit String; E program source corresponding to Data-E
deSubgraphKit Arbitrary objects; the unserialized form
All of these kits represent all of Data-E; the situation here has not
previously come up.
--------------------------------------------------------------------
Argument #1:
"deJSONKit" should be the one which represents all of Data-E (since
that is the default case at present and should be unmarked), and
trades off by having specific JSON structures represent Data-E
constructs rather than being able to express all of JSON.
In this case, what should the name of the thing currently called
deJSONKit be? MarkM suggests "deEmbedJSONKit", which I find unintuitive.
--------------------------------------------------------------------
Argument #2:
It is more appropriate for the all-of-Data-E kit to be named with a
name that indicates it is producing the specific "Data-E in JSON"
language, which is an application of JSON.
Conversely the "deJSONKit" name is free to be used for the one which
is useful for all of JSON, which is good because "deJSONKit" is the
natural thing for an E programmer to reach for in the scenario "I need
to read/write JSON / talk this JSON-based protocol".
--------------------------------------------------------------------
Related but independent question: If running inside a JavaScript VM,
there is the possibility of the input/output being, not JSON (which is
text), but rather the objects which correspond to JSON considered as
JavaScript syntax. What should this be referred to as when
constructing kit names? MarkM suggests "JSONTree".
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list