Re: RAII and Deterministic Destruction

2015-08-26 Thread kink via Digitalmars-d-learn
A serious bug affecting RAII is https://issues.dlang.org/show_bug.cgi?id=14903, but apparently its importance hasn't been properly acknowledged yet. Improving the performance of binaries produced by dmd's backend is obviously way more important than fixing serious bugs or commenting on

Re: Confused about referencing in D

2016-07-14 Thread kink via Digitalmars-d-learn
On Thursday, 14 July 2016 at 06:23:15 UTC, Gorge Jingale wrote: I think that the assignment in the first case is not assigning the reference returned by auto ref GetValue(). Yep. There's no such thing as C++ `auto& val = GetValue()` in D. You'd have to use a pointer instead: `auto pVal = ()`.

Re: vsprintf or printf variable arguments

2016-08-05 Thread kink via Digitalmars-d-learn
On Thursday, 4 August 2016 at 21:03:52 UTC, Mark "J" Twain wrote: How can I construct a va_list for vsprintf when all I have is the a list of pointers to the data, without their type info? A va_list seems to be a packed struct of values and/or pointers to the data. While I could construct

Re: Fast multidimensional Arrays

2016-08-29 Thread kink via Digitalmars-d-learn
At the very least, give the LDC command line a `-release`, otherwise you end up with all assertions enabled etc.

Re: Visual Studio Linker Problem

2016-10-18 Thread kink via Digitalmars-d-learn
On Tuesday, 18 October 2016 at 05:23:15 UTC, Jason C. Wells wrote: I am able to compile hello world using dmd2. I am running in cygwin because I understand bash way better than cmd.exe. I bet it works if you invoke LDC outside bash. bash may tamper with environment variables, I've had a

Re: A simplification of the RvalueRef idiom

2016-11-22 Thread kink via Digitalmars-d-learn
On Tuesday, 22 November 2016 at 16:05:35 UTC, Satoshi wrote: Sorry, but D seems to be worse and worse day by day. This should be resolved by language and not doing it by template function. I hate this 'idiom' too (just a clumsy workaround for something that should work out of the box), but

Re: this is not an lvalue

2016-12-13 Thread kink via Digitalmars-d-learn
On Tuesday, 13 December 2016 at 16:23:16 UTC, Adam D. Ruppe wrote: On Tuesday, 13 December 2016 at 15:09:10 UTC, Andrey wrote: void moveTo(ref Parameter parent) { You probably don't want the `ref` there, nor likely on any other method definitions (especially check removeValue). Assuming