Modify Properties "In-Place" (add, subtract, put,
Posted: Wed Nov 18, 2009 12:25 am
Take this common situation:
Or this one:
While wordiness is to be expected in Rev, the modification of properties is very cumbersome. Now that Rev is going mainstream with 4.0 (with a free development version) making the language as easy to use for the masses is an important thing to focus upon.
This same pattern of "set the X of Y to the X of Y with some modification" happens so often, I'd expect the language to provide a shortcut.
I suggest the "prop[erty]" keyword only in case "the" is not enough to identify a property. Behind the scenes, all that is happening is a implicit set and get of the property, but done without needless repetition.
I could be missing some neglected bit of grammar, but even in the examples RunRev provides on the website, the repetitious form is still being used. Seems rather off-putting for beginners...
Just a suggestion.
Code: Select all
set the GameScore of this card to the GameScore of this card + 1
Code: Select all
set the TimestampList of button "Record Timestamp" to the TimestampList of button "Record Timestamp" & return & the time
This same pattern of "set the X of Y to the X of Y with some modification" happens so often, I'd expect the language to provide a shortcut.
Code: Select all
add 1 to the GameScore prop[erty] of this card
put return & the time after the TimestampList prop of button "Record Timestamp"
I could be missing some neglected bit of grammar, but even in the examples RunRev provides on the website, the repetitious form is still being used. Seems rather off-putting for beginners...
Just a suggestion.