SQL is a language to produce "Qualified Tables" (these columns, these rows, sorted, grouped, joined, ...). If we encompass all data structures, not just tables, and also include logic then we would be done. Jane will produce a language that does just this.
All compilers and hardware treat data structures differently, however we do not. This makes it impossible to do what I want to do with our current compilers. I need "QUALIFIED DATA STRUCTURES", which is a technology that can meet our individual representation for every type of data structure, and supply logic specific to our needs.
For example: Take a "Visual Basic Variant" data struture, a 16 bytes used to describe 40 "immutable" data structures. If we qualify the variant to be "mutable" then the logic and overall capabilities of the application changes. The system would add the value "current memory allocation length", which allows dynamic memory allocation (mutable) instead of fixed allocation (immutable). This would permit working with large data structures possible, and still be compatible.
Visual Basic Variants, .NET object type, marshalling, serialization, and other generalized structure management paradigms, are words that define specific structures and logic. These processes also need to be moved and qualified. However they only handle their own environments in a predefined way. (And I hate the words they use). see: Comparison of data-serialization formats Some are labeled "readable", none of them are "understandable". Where "understandable" means no external documentation, code tables, or logic is required. Is the structure understandable by the human and the computer equally?
Start by making a list of missing knowledge for each type of data structure. Some Knowledge is run-time, some is compile-time, and others are supplied by the human. This knowledge is used for the automated programming of the appropriate logic. This list will grow to the number or terms times the different context for each term (i.e. the term "tree" might have 30 different context uses). The webster's Dictionary has 470,000 words and any number of context used for each word. Then there is probably a million times this many terms "Gone With the Wind" and their meanings (as a book, movie, title, imagery, reference to the author / actors, ...). Fortunately knowledge is static (the day your were born does not change). Those things that do change (price of gas) we adjust, knowing it is date and geographic based.
Common to ALL data structures:
Common to a Number:
Common to a Text value:
var a,b,c,x,persons,rachel,clif; var structure, structureName, structureText, cg2; window.Person = Person; structureName = 'Example_' + (mySelect.selectedIndex + 1); //----------------------------------- sample structures ----------------------- a = [10,11,12]; a.name = 'a'; Object.defineProperty(a, 'name', {enumerable: false} ); b = [100,200]; b.name = 'b'; Object.defineProperty(b, 'name', {enumerable: false} ); // ------ a and b used in example 2, would like "name" automated, but compiler does not supply, so I hardcoded it // ------ just to show how minor changes made a world of difference to understanding and capabilities in logic if we had them c = 12.5; persons = []; // plural of person rachel = new Person(persons,'Rachel'); clif = new Person(persons,'Clif'); structureText = "@@structure@@"; structure = eval(structureText); //----------------------------------- Object to cg2 --------------------------- cg2 = structure.toCg2( structureName, structureText, nested.checked, excludeLoadFunctions.checked, includeJSON.checked); edit_cg2.setValue(cg2); //========================================================================== // Person //========================================================================== function Person(persons, name) { this.persons = persons; // force a circular reference this.name = name; // ~~ ~1~ (force a unique tag of 2) this.what_is = isWhat; this.test = new Function('alert("hello world")'); Object.defineProperty(this, 'name', {writable: false} ); // readonly name this.persons.push(this); }