-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-value properties: positions' custom names #107
Comments
To the persons wondering what he is talking about, he wants to have custom references to the positions in the property value stack. I have edited the title to make that clear. |
If we were to implement this, the name assigment of the position needs to be granular (you could name one position and leave the others unnamed). The naming will be scoped and will have its own declaration (can't be bound to the initial value). Using the reference function for the same property will preserve the name as well:
That said how would you assign a name to a position? Here's what I propose:
|
|
I don't think this is such a good idea. It could easily be confused with
As a user I would expect that to set the second value of |
You mean you would confuse I guess that could be confusing if you don't grasp the concept behind the value selector. @Ragnis In the case of |
@vprimachenko the problem with your last proposal is that it doesn't satisfy what Iv listed up there: it requires us to list the values everytime. It needs to be separated. But here's something that can be done about it:
It's not convenient if you wanna name only one value. It needs to be granular. |
why?
usecase: i want to set two backgrounds, and later add new one to a named slot
where usecase: i want to remove all existing backgrounds and specify new one edited
usecase: i want to add a new value to an unnamed slot
inspired by then you should have gave it a name, thats what them are for
|
Sorry but your second example wouldn't work. You would end up resetting the property and not add a new value. To add new values you need to use the |
Funcod, you've got something something wrong. VP wasn't saying to assign a name to an object, he was setting an object with that name (slot) to the background property. It's not wether it would work, it's a matter of wether we like the syntax, which is another matter. On 17/09/2013, at 22:55, "Marc G." [email protected] wrote:
|
I perfectly understand what he wants. He wants to assign a name to the position (totally independent of its current value). And you didn't understand why it wouldn't work. To add a new background and end up with 3 values he needs to use the current keyword. Since he's trying to assign the name at the same time maybe you didn't realize it wouldn't work. Anyhow it's not a matter of liking the syntax, we want something that blends with what we currently have and which would be convenient to use. For that you need to separate the name assignment from the property setting. |
lets break
terms in single quotes are placeholders due my lack of better word |
Where? Which position would it take? The last one by default? It seems you don't want to assign a name to a position but a name to a value (which, the value, can later be changed) which means it will be difficult to track the position of the named value. IMO we are not gaining much but I am not against it. On the other hand, like @veosotano said on IRC, I don't like the multi assignment syntax. |
the thing we put in the square brackets should be related to the property rather then its value(object inside). Eg a weather app
later on i can override its value without renaming:
and
background["city"]
would stay "city" no matter if i put the skyline of Chicago or Canberra in it.Conta: how do one make multiple such assignment in one rule?
well while this syntax
works but might be unsatisfiable a discussion regarding an 'assign at once' syntax was held ages ago and mentioned
PHP
like 'fat arrow', but with #106 in mind one could think ofThe text was updated successfully, but these errors were encountered: