[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 bearophile_h...@eml.cc changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #28 from yebblies 2012-02-06 02:56:56 EST --- The problem with this bug report is that there are too many different issues. Most of those cases you just mentioned deserve their own bug report, and to be evaluated individually. Lar

[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #27 from timon.g...@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 er

[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #26 from bearophile_h...@eml.cc 2012-02-05 07:25:01 PST --- (In reply to comment #25) > Eventually? Why not now? Before closing this bug, a new issue needs to be written and opened, of course. And I can't want to write a new issue

[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #25 from yebblies 2012-02-06 00:55:42 EST --- Eventually? Why not now? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 3971] Syntax & semantics for array assigns

2012-02-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #24 from bearophile_h...@eml.cc 2012-02-05 05:52:16 PST --- (In reply to comment #23) > Are all the other cases fixed? > > I know this is an old report, but the way cases are presented in the initial > report make it a pain to test

[Issue 3971] Syntax & semantics for array assigns

2012-02-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 yebblies changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment #23 from yeb

[Issue 3971] Syntax & semantics for array assigns

2011-11-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #22 from bearophile_h...@eml.cc 2011-11-25 16:54:31 PST --- In DMD 2.057head this code fails still: void main() { int[3] a = [1, 2, 3]; int[3] b = [10, 20, 30]; auto c[] = a[] + b[]; // no identifier for declarator c[]

[Issue 3971] Syntax & semantics for array assigns

2011-11-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #21 from Don 2011-11-19 13:52:04 PST --- (In reply to comment #20) > Also from that thread: > > First thing: > > int[3] a=3; // kill it!! > > Rest: > > a[] is _just a shortcut_ for a[0..$]! Are you really suggesting to disallow

[Issue 3971] Syntax & semantics for array assigns

2011-11-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #20 f

[Issue 3971] Syntax & semantics for array assigns

2011-11-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #19 from bearophile_h...@eml.cc 2011-11-15 23:56:31 PST --- (In reply to comment #18) > See: > > http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=149289 This is from that post: This also means t

[Issue 3971] Syntax & semantics for array assigns

2011-11-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #18 from bearophile_h...@eml.cc 2011-11-15 19:33:10 PST --- (In reply to comment #17) > With latest dmd (git master): Very nice. See: http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=149289 --

[Issue 3971] Syntax & semantics for array assigns

2011-11-02 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #17 from Kenji Hara 2011-11-02 00:04:27 PDT --- With latest dmd (git master): Rhs is an array, is it compilable? a / b a=b a[]=b a=b[] a[]=b[] int[3u] / int[3u] truetruetruetrue int[

[Issue 3971] Syntax & semantics for array assigns

2010-12-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 Stewart Gordon changed: What|Removed |Added CC||s...@iname.com --- Comment #16 from S

[Issue 3971] Syntax & semantics for array assigns

2010-12-06 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 Denis Derman changed: What|Removed |Added CC||denis.s...@gmail.com --- Comment #15 fr

[Issue 3971] Syntax & semantics for array assigns

2010-09-28 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 bearophile_h...@eml.cc changed: What|Removed |Added Severity|enhancement |major --- Comment #14 from bea

[Issue 3971] Syntax & semantics for array assigns

2010-08-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #13 from bearophile_h...@eml.cc 2010-08-11 08:39:21 PDT --- While compiling this program: void main() { int[1] a1; int[1] a2[] = a1[]; } compatibility with C syntax produces this error message: test.d(3): Error: cannot imp

[Issue 3971] Syntax & semantics for array assigns

2010-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #12 from Don 2010-05-04 09:43:56 PDT --- (In reply to comment #11) > Such behavior is very bug-prone: in the case of tag array it does matter > whether you meant array op or array itself as value, see bug 3395 comment 2. > If > com

[Issue 3971] Syntax & semantics for array assigns

2010-05-04 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #11 from Sobirari Muhomori 2010-05-04 09:24:59 PDT --- Such behavior is very bug-prone: in the case of tag array it does matter whether you meant array op or array itself as value, see bug 3395 comment 2. If compiler can distinguis

[Issue 3971] Syntax & semantics for array assigns

2010-05-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #10 from Don 2010-05-01 22:08:28 PDT --- (In reply to comment #9) > > internally the compiler doesn't distinguish between x[] and x, where x is a > > dynamic array. > This means, that array ops are a huge hack? No. According to th

[Issue 3971] Syntax & semantics for array assigns

2010-05-01 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #9 from Sobirari Muhomori 2010-05-01 08:14:28 PDT --- > internally the compiler doesn't distinguish between x[] and x, where x is a > dynamic array. This means, that array ops are a huge hack? -- Configure issuemail: http://d.pu

[Issue 3971] Syntax & semantics for array assigns

2010-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 Don changed: What|Removed |Added CC||clugd...@yahoo.com.au --- Comment #8 from Don 2

[Issue 3971] Syntax & semantics for array assigns

2010-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #7 from bearophile_h...@eml.cc 2010-04-19 14:42:31 PDT --- You are right, the c=a; case can be allowed, it can just copy the ptr and length of the static array inside the struct of the dynamic array (this is how D currently works). T

[Issue 3971] Syntax & semantics for array assigns

2010-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #6 from Sobirari Muhomori 2010-04-19 14:11:17 PDT --- Why c=a; is an error? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---

[Issue 3971] Syntax & semantics for array assigns

2010-04-18 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #5 from bearophile_h...@eml.cc 2010-04-18 16:27:47 PDT --- This: a = b; static dynamic static Err2Err dynamic Err OK2 Means: int[5] a, b; a = b; // Err2 int[] c = new int[5]; a = c; // Err c = a; // Err int[]

[Issue 3971] Syntax & semantics for array assigns

2010-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #4 from Sobirari Muhomori 2010-04-16 13:08:07 PDT --- a = b; static dynamic static Err2Err dynamic Err OK2 ^ As I understand, this disallows assignment of a static array to the dynamic one? Is this related t

[Issue 3971] Syntax & semantics for array assigns

2010-04-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #3 from bearophile_h...@eml.cc 2010-04-14 12:09:37 PDT --- "a" and "b" are arrays. "dynamic" means dynamic array. "static" means stack-allocated fixed-sized array. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.c

[Issue 3971] Syntax & semantics for array assigns

2010-04-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #2 from Sobirari Muhomori 2010-04-14 11:07:25 PDT --- What "static", "dynamic", "a" and "b" mean? And those diagrams? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this ma

[Issue 3971] Syntax & semantics for array assigns

2010-04-12 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3971 --- Comment #1 from bearophile_h...@eml.cc 2010-04-12 17:41:46 PDT --- But be careful, in this code Tri c[] is seen as Tri[] c, and it doesn't compile: alias double[3] Tri; void main() { Tri a = [1, 2, 3]; Tri b = [10, 20, 30]; Tri