New assignment operator "=&"

new topic     » topic index » view thread      » older message » newer message

Stop me if you've heard this one before.
This thought occurred to me when trying to translate some Ruby unshift statements.
We've got append() and prepend().
We've also got a &= b which is equivalent to a = a&b.
I propose a new operator a =& b which is equivalent to a = b&a.

Thoughts? Are there any cases this would foul up existing code?
Would there be a similar need for =- and =/ (assuming += and *= suffice)?

Pete

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu