Following on from Frank Clarke's presentation to the 2013 Symposium, I wonder if users would benefit from an ::Asset directive. It would function much as the ::Constant directive, but the value would be whatever was on the subsequent source lines up to the next directive or end of file. The parser would treat these lines as comment.
This could be used for panel data as per Frank's presentation, or sql queries or user instructions or a host of other things
made up example
Select profit - costs as margin
where profit > 0
The string value of the asset could be retrieved by .class~AssetName ie .queries~Margin
An added bonus would be the ability to substitute values on retrieval, but perhaps that would over-complicate matters.
::asset sales %startdate %enddate
where invoicedate >= '%startdate'
and invoicedate <= '%enddate'
the substitution argument(s) can be any string and the passed parameters are substituted for it wherever it appears in the asset at retrieval time
qry = .queries2~sales('2012-01-01','2012-03-31')
would return the string
where invoicedate >= '2012-01-01'
and invoicedate <= '2012-03-31'
What do you think?