dok/paper/unifying-tables-objects-and-documents
Extent the type system of C# with many advanced types like streams, tables, tuples, unions, etc..
[1] E. Meijer and W. Schulte, “Unifying Tables, Objects and Documents”.
The design space
- Denotables values should be (easily) expressible If programmers can declare a variable of a certain type, it must be possible to write a expression of that type in a convenient way.
- Expressible values should be denotable If programmmers can write an expression of a certain type, it must be possible to declare a variable whose static type precisely matches that of the expression.
- No forced identity Programmers should never be forced to introduce either nominal identity of types, or object identity of values (aliasing).
- Orthogonality There should be no special cases that discriminate between tables, documents and objects. Operations should work uniformly across the three worlds.
- Flexibility The new types should have rich subtyping relationships that ease in writing type correct and evolvable software
Streams are implemented using Iterators. They added yield
for adding elements to a stream.
They flatten streams of nested-data-structures
MAYBE in case of nested-data-structure, maybe it is better Dok AG
A nice fact it is that the tool they used, deduce the exact type of a query, and express it as stream, optional values, and variants.