Collections in Paml actually define a data model.
Duality of variables in Paml is the outcome from two different modeling approaches, data model and object model, which implicitly exist in object-oriented programs.
The syntax of collection operations is based on SQL and LINQ syntaxes.
One of LINQ features is that LINQ actually applies a data model for operating on sequences of items. In modern programming languages, only raw iterative data structures are defined such as arrays, lists, dictionaries, queues etc.
Paml takes the LINQ concepts for explicit data model in a language and uses a collection as an abstraction for any sequences of items. A collection can be then transformed into particular data structure or container, such as a list or database table.
Items of a collection are actually values, though collection can be declared with items as objects. In this case object instance expression should be used in projection and object access operator to access items as objects for sending messages to them.
For collection, operations are defined such as filtering, sorting, projecting, grouping etc. Actually they are query elements. Such collection operations like adding items, removing or finding, they look like aspects or symbolic operators, and as so should be implemented via transformation, and models just define syntax for them.
Write a comment