You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a meeting today, we were discussing how most Chapel types are "singletons" that can't be partially modified, but have to be modified via re-assignment: integers, ranges, dense rectangular domains, strings, bytes. It was asserted that complexes had this property as well, and a few of us confirmed that that was our understanding / recollection, but checking, it seems we were wrong about that. For example, you can write:
var c:complex;
c.re =1.0;
which makes complexes somewhat of an outlier compared to other built-in types (but if viewed as being similar to a record or tuple, perhaps doesn't make it an outlier at all).
This issue asks whether we're sure that this is what we want given that some of us had it wrong.
The text was updated successfully, but these errors were encountered:
How is works currently is perfectly fine with me. Certainly this is how I use it in my code and have for as long as I can remember. You would break my code and numerous algorithms is you did not allow it, or at least provide a method to update the real or imaginary field on its own. I do not consider it an outlier. It seems perfectly natural.
OK, thanks. I'm going to close this then, as I don't think there's any real argument for changing the behavior; I just wanted to note it because a few people asserted that it couldn't be changed piece-wise, and I wanted to make sure we hadn't enabled it without consideration.
In a meeting today, we were discussing how most Chapel types are "singletons" that can't be partially modified, but have to be modified via re-assignment: integers, ranges, dense rectangular domains, strings, bytes. It was asserted that complexes had this property as well, and a few of us confirmed that that was our understanding / recollection, but checking, it seems we were wrong about that. For example, you can write:
which makes complexes somewhat of an outlier compared to other built-in types (but if viewed as being similar to a record or tuple, perhaps doesn't make it an outlier at all).
This issue asks whether we're sure that this is what we want given that some of us had it wrong.
The text was updated successfully, but these errors were encountered: