Re: Does slicing have an effect?

2019-05-25 Thread Max Haughton via Digitalmars-d-learn
On Tuesday, 21 May 2019 at 20:31:58 UTC, Dennis wrote: I was replacing a memcpy with a slice assignment and accidentally used == instead of =. Usually the compiler protects me from mistakes like that: ``` int[4] a; a == a; ``` Error: a == a has no effect However, because I was using slices it

Re: dmd -nodefaultlibs?

2019-05-21 Thread Max Haughton via Digitalmars-d-learn
On Tuesday, 21 May 2019 at 21:48:22 UTC, Jonathan Marler wrote: Is there a way to prevent dmd from adding any default libraries to its linker command? Something equivalent to "-nodefaultlibs" from gcc? https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html I'd still like to use the dmd.conf

Re: DIP1000: Should this compile

2019-05-16 Thread Max Haughton via Digitalmars-d-learn
On Thursday, 16 May 2019 at 21:56:52 UTC, Steven Schveighoffer wrote: On 5/16/19 10:21 PM, Max Haughton wrote: https://run.dlang.io/is/cKFsXh Should this compile, or is return scope T* down to the user to not escape (Returning directly does not compile) Answer to subject: no. This is a

DIP1000: Should this compile

2019-05-16 Thread Max Haughton via Digitalmars-d-learn
https://run.dlang.io/is/cKFsXh Should this compile, or is return scope T* down to the user to not escape (Returning directly does not compile)

<    1   2