Chris Angelico wrote:
>On Thu, Aug 28, 2014 at 3:44 AM, Stephen R. van den Berg <[email protected]> wrote:
>> - There obviously is no `= lfun.  Is that technically challenging or
>>   hasn't there simply been no need to make it possible?

>Don't like this idea! When you assign to a name, it should always
>rebind. Imagine:

>mixed foo = String.Buffer();
>foo = "asdf";

>Should that call foo->`=("asdf"), or reassign foo? IMO it should
>absolutely always reassign. Otherwise you get something like PHP's
>references - a pain to work with.

The operation could be determined by "overloading" based on types.
I.e. a String Buffer `=(string a) would only activate when the lvalue is
a buffer type, and the rvalue is of type string.
-- 
Stephen.
  • Fun... Stephen R. van den Berg
    • ... Chris Angelico
      • ... Stephen R. van den Berg
        • ... Chris Angelico
          • ... Stephen R. van den Berg
            • ... Martin Bähr
              • ... Stephen R. van den Berg
                • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
                • ... Stephen R. van den Berg
                • ... Per Hedbor () @ Pike (-) developers forum
                • ... Chris Angelico
                • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
    • ... Mirar @ Pike developers forum

Reply via email to