solomono / kiama

Automatically exported from code.google.com/p/kiama
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Rewriting: Rename query to command? #67

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The method name "query" for a method that is executed for its side-effects is 
rather confusing as in many other contexts (e.g. 
http://en.wikipedia.org/wiki/Command%E2%80%93query_separation) a query is 
something that returns a value and doesn't have any side-effects.
For consistency reasons you might add a command method and deprecate the query 
method.

Original issue reported on code.google.com by Martin.Mauch@gmail.com on 3 Jan 2015 at 10:31

GoogleCodeExporter commented 9 years ago
I agree that the naming of `query` is not ideal. The current version of that 
strategy is somewhat of a hack to get a limited "folding" capability in there.

We plan to do some more serious overhauling of the so-called type-unifying 
strategy support in Kiama's rewriting library. Those strategies will be much 
more like folds over the structures and hence `query` will be a more suitable 
name. 

 Hence we don't plan to change the name now. But in the future things will be more sensible, hopefully. Thanks for the prompt though.

Original comment by inkytonik on 12 Jan 2015 at 3:03