Re: How to get rid of const / immutable poisoning (and I didn't even want to use them...)

2017-05-23 Thread Kagamin via Digitalmars-d-learn
https://dpaste.dzfl.pl/74d67cfca3e8

Re: How to get rid of const / immutable poisoning (and I didn't even want to use them...)

2017-05-22 Thread ag0aep6g via Digitalmars-d-learn
On 05/22/2017 10:13 PM, Enjoys Math wrote: immutable struct String(T) { Marking a whole struct as `immutable` is usually a mistake. It applies to all methods, making them unusable on mutable and const instances. public: this(immutable T[] s) { This means you can create `String`s

Re: How to get rid of const / immutable poisoning (and I didn't even want to use them...)

2017-05-22 Thread Enjoys Math via Digitalmars-d-learn
On Monday, 22 May 2017 at 20:12:56 UTC, Enjoys Math wrote: I had to employ const / immutable to some things to get passed some compiler errors. Then the poisoning continues. How do I get this code to run? String's will hold a T[] which actually will not be modified by the String methods

Re: How to get rid of const / immutable poisoning (and I didn't even want to use them...)

2017-05-22 Thread Enjoys Math via Digitalmars-d-learn
On Monday, 22 May 2017 at 20:12:56 UTC, Enjoys Math wrote: I had to employ const / immutable to some things to get passed some compiler errors. Then the poisoning continues. How do I get this code to run? String's will hold a T[] which actually will not be modified by the String methods

How to get rid of const / immutable poisoning (and I didn't even want to use them...)

2017-05-22 Thread Enjoys Math via Digitalmars-d-learn
I had to employ const / immutable to some things to get passed some compiler errors. Then the poisoning continues. How do I get this code to run? String's will hold a T[] which actually will not be modified by the String methods ("immutable strings of T"). I did not want to use any