[swift-evolution] Overloading assignment operator
don.wills at portablesoftware.com
Mon Dec 7 08:15:55 CST 2015
Thanks to all who replied. I apologize that my responses were disjoint - my spam checker delayed a couple of the messages until this morning.
To those who suggested literal convertibles, I believe Stephen is correct in that it is insufficient to accomplish the semantics that I want with the syntax I had hoped for. It is about more than just initialization. I'll probably just use ":=" as the assignment operator. Not optimal, but it works.
> On Dec 6, 2015, at 11:59 AM, Stephen Celis <stephen.celis at gmail.com> wrote:
> I think that his number assignment (via `<~`) depends on the current state of `amount`, and that using FloatLiteralConvertible does not provide enough information at the call site (since the current value is not available in the initializer).
More information about the swift-evolution