On Mar 9, 2012, at 12:36 PM, Adrian Crum wrote: > > On 3/9/2012 11:30 AM, Jacopo Cappellato wrote: >>> On Mar 9, 2012, at 10:03 AM, Adrian Crum wrote: >>>> Another advantage of this approach is the syntax remains the same across >>>> languages. >> I also have some doubts that a language independent DSL would be very >> useful: the main concept is to extend the language of your preference in a tr >> >> For example, in order to copy contents of maps from map to map in Groovy you >> can do something like: >> >> lookupFieldMap = parameters.subMap(['inventoryItemId', 'productId']) > > Now I understand the confusion - there is nothing "DSL" about copying a Map. > In my mind the "Domain" in an OFBiz DSL is "OFBiz" - so the DSL adds > OFBiz-specific extensions to the language. > > What you're describing would be handled by third-party libraries.
I am simply saying that, if the goal is to be ready to switch from Groovy to the next language that will come, and we have code like this: lookupFieldMap = parameters.subMap(['inventoryItemId', 'productId']) record = findOne('InventoryItem', lookupFieldMap) then the difficult part will be to convert the first line, not the second. I don't see how the following code: lookupFieldMap = parameters.subMap(['inventoryItemId', 'productId']) record = script.findOne('InventoryItem', lookupFieldMap) would make it easier. Jacopo