Op 29-4-2012 23:30, Charley Bay schreef:
> In addition to "bindings" and "assignment" (possibly including 
> single-values or lists-of-values), is there a QML concept of 
> "plus-equals"?
>
> For example:
>
> Item {
>   my_set0 : some_val0;      // replace value
>
>   // ...can I "accumulate" values?
>   my_set1  :+  added_val;   // Something like this?
>   my_set2  +:  added_val;   // Something like this?
> }
>
>

My gut feeling is, that += is just wrong in terms of declarative 
programming. It has a destinctive imparative feel to it. I think you 
need to come at it from the other side. Instead of extending a variable 
wherever you have a new value to add, we need to search for a syntax 
that allows to declare my_set as some set of items that will be declared 
later on. Some sort of 'member-of-list' syntax.

I'm really not sure on what would be a good syntax for that though.

André


_______________________________________________
Qt-qml mailing list
Qt-qml@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-qml

Reply via email to