[Issue 3971] Syntax & semantics for array assigns

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 5 07:42:39 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3971



--- Comment #27 from timon.gehr at gmx.ch 2012-02-05 07:42:38 PST ---
Every O(n) vector operation already requires [].

> But there are other less clear-cut situations. If O(n) vector ops require a [],
> then this too has to be a compile-time error (despite a and b are values):
>
>
> void main() {
>    int[3] a, b;
>    a = b; // Not OK, hidden vector op
> }

The "hidden" operation is O(1).

If what you want is differing behavior based on whether an operation is O(n) or
O(1), the language already does what you want.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list