On Sunday, 1 March 2015 at 02:53:34 UTC, Manu wrote:
On 1 March 2015 at 12:48, Andrei Alexandrescu via Digitalmars-d
<[email protected]> wrote:
On 2/28/15 6:33 PM, Manu via Digitalmars-d wrote:

one of the biggest recurring
complaints relating to the D type system


That didn't get talked about in I don't remember. -- Andrei

So, what's the solution?
I've never complained about it, but I still have this problem
regularly. The solution in my experience is; 'everything is always
mutable'.

I've lost count now of how many times I've had to downgrade to auto despite always wanting immutable or const. This doesn't work:

 auto reg = regex(`(foo)`);
 const match = "foo".matchAll(reg);
 writeln(match.captures); //oops, captures isn't const

It should, but it doesn't. Maxime talked about it here as well:

http://pointersgonewild.com/2014/07/11/the-constness-problem/

Atila

Reply via email to