On 19 October 2012 18:33, Dale Henrichs <dhenrich@vmware.com> wrote:
Igor,
"you can do anything you like" ... you mean like choosing to use STON and not invent my own notation format?
STON is a perfectly good notation format for Smalltalk...
Methinks that with your recent suggestions are no longer using literal Smalltalk syntax which is fine, if we are not restricted to literal Smalltalk syntax, then the following should be a valid format:
{ "category" : "Topez-Client-Core", "classinstvars" : [ ], "classvars" : [ ], "commentStamp" : "", "instvars" : [ "project", "package", "currentClass", "classOrInstance", "category", "selector", "history", "currentWindowId", "windows", "namedWindows" ], "name" : "TZTopezStatus", "pools" : [ ], "super" : "Object", "type" : "normal" }
which brings us back to were we started.
Smalltalk does not have a literal syntax for dictionaries. While fabricating dictionaries from literal arrays is possible, the results are not very readable ... unless you start taking liberties with Smalltalk syntax...
why liberties? if smalltalk parser can chew such expression without syntax errors, then what is difference? please note, that STON above cannot be parsed by smalltalk parser , because anything is double quotes "" treated as comment.. it is mainly about reusing what we already have.. If it just about 'create a best human-friendly notation format, no matter what' then neither STON nor JSON is not nearly closer to that. But my aims is slightly different.
If you are no longer restricting yourself to Smalltalk syntax, then what's wrong with the STON notation above?
Dale
-- Best regards, Igor Stasenko.