Thanks for your detail review,
As a general, this proposal won't solve much of the problem or any problem but it might be helpful for shortcode writing, That's why I don't have any particular problem case to show here.
One problem I can mention here is about the variable name lengths. Usually, js variables name gets bigger as the project goes deeper (at least for me
), so it may align there.
var someReallyReallyLongVariableName;
Currently, if we want to work with this var, then we need to write it twice on LHS and RHS
someReallyReallyLongVariableName = someReallyReallyLongVariableName.toLowerCase()
Now, this proposal will help here,
someReallyReallyLongVariableName .= toLowerCase()
Or for example with objects
propTree = {
props : {
props2 : {
props3 : {
props4 : {
props5 : "ends here"
}
}
}
}
}
Now in order to assign the value of props5
to props4
, we are doing this
propTree.props.props2.props3.props4 = propTree.props.props2.props3.props4.props5
What I am proposing is to change it to something like this
propTree.props.props2.props3.props4 .= props5
We can see these kinds of operations more in forms with more number of fields in general
What I meant by concatenation operator or any operator chaining was that this proposal will behave like those but in different space (here it will be for function chaining instead of strings or numbers or any other basic datatypes)