<div dir="ltr"><div dir="ltr">On Sat, Apr 25, 2020 at 7:00 AM Walter Bright via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Let's not fall into the mode of only looking at the way C++ did it and not <br>
seeing other ways. C++ has problems (like not having arrays) that lead it in <br>
different directions for solving array-like problems.<br></blockquote><div><br></div><div>It is so predictable that you will eventually produce a sentence like this whenever I suggest anything.</div><div>To be clear; **I started with your proposal** when thinking on this. I quickly determined it was unworkable.</div><div>The fact that I chose the same syntax as C++ is for a few reasons:</div><div> 1. we also use `...` to build tuples, it seems natural to invoke the same syntax here</div><div> 2. it turns out that it's grammatically unambiguous!</div><div> 3. it's familiar and unsurprising, and there's no compelling reason to ignore the precedent in point #1 just for the sake of being different than C++ (which would be the only argument against as far as I can tell)</div><div><br></div><div>It's also not a bad idea to look to acclaimed success stories for inspiration, and I think `...` is probably C++'s biggest success story this century.</div><div>It is not awkward or troubling in C++. It's an unusually excellent piece of language.</div><div><br></div><div>With respect to D though, we gain so much more than C++ can. C++ doesn't have tuples, but we do!</div><div>It applies with a beautiful uniformity, and it's useful in a lot more situations and with a lot less boilerplate cruft than C++ could ever dream.</div><div>This will make junk template instantiations a thing of the past, and it's also terse and very readable.</div><div><br></div><div>I can't imagine a reason to change my proposal. The only reason I would consider changing it is if you can make your (like-arrays) proposal work... but it doesn't. I explored that a lot, believe it or not. I really wanted to believe it could work.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
What do other languages do? How are things like this expressed in mathematics?<br></blockquote><div><br></div><div>C++ uses `...`, and they are the only language that has anything remotely like this.</div><div>Javascript also uses `...` for something similar-ish, so the web guys should find it familiar too.</div></div></div>