Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Nicholas Wilson via Digitalmars-d
On Saturday, 21 July 2018 at 04:09:25 UTC, Jonathan M Davis wrote: Honestly, I think we're just coming from points of view that are too different. IMHO, the core use case for ref is for a function to mutate an argument and have that result progagate to the argument, I think the critical

Re: Symmetry Autumn of Code

2018-07-20 Thread Joakim via Digitalmars-d-announce
On Saturday, 14 July 2018 at 07:30:26 UTC, Joakim wrote: On Saturday, 14 July 2018 at 06:02:37 UTC, Mike Parker wrote: Thanks to the sponsorship of Symmetry Investments, the D Language Foundation is happy to announce the Symmetry Autumn of Code! We're looking for three university students to

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 19:13:00 Manu via Digitalmars-d wrote: > I can't see how this is a compelling reason to dismiss all the > advantages of this DIP in favour of keeping the current semantic. Honestly, I think we're just coming from points of view that are too different. IMHO, the core use

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 18:17, Jonathan M Davis via Digitalmars-d wrote: > > On Friday, July 20, 2018 18:04:26 Manu via Digitalmars-d wrote: > > On Fri, 20 Jul 2018 at 18:02, Manu wrote: > > > [...] > > > > > > I think you're describing now a bug where a function returns an > > > lvalue, but it

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 18:04:26 Manu via Digitalmars-d wrote: > On Fri, 20 Jul 2018 at 18:02, Manu wrote: > > [...] > > > > I think you're describing now a bug where a function returns an > > lvalue, but it was meant to return an rvalue. > > Sorry, wrong way around! I meant to say: > I think

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 18:02, Manu wrote: > > [...] > > I think you're describing now a bug where a function returns an > lvalue, but it was meant to return an rvalue. Sorry, wrong way around! I meant to say: I think you're describing now a bug where a function returns an rvalue, but it was

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 17:33, Jonathan M Davis via Digitalmars-d wrote: > > On Saturday, July 21, 2018 00:10:09 Nicholas Wilson via Digitalmars-d wrote: > > So this problem is restricted output range @properties that > > somehow don't return by ref, aren't intended to be used after > > having

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Saturday, July 21, 2018 00:10:09 Nicholas Wilson via Digitalmars-d wrote: > So this problem is restricted output range @properties that > somehow don't return by ref, aren't intended to be used after > having data written to them _and_ aren't singleton like? It's a problem for any function

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Nicholas Wilson via Digitalmars-d
On Friday, 20 July 2018 at 23:35:46 UTC, Jonathan M Davis wrote: On Friday, July 20, 2018 14:35:57 Manu via Digitalmars-d wrote: Comparatively rare? It's exactly what most functions using output ranges need to do. For many output ranges, if the function copies the range instead of copying,

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 14:35:57 Manu via Digitalmars-d wrote: > > > Their currently behaviour is mostly wrong, and the exact thing I'm > > > trying to fix though. > > > > Why would the current behviour be mostly wrong? If the purpose of using > > ref is to accept the current value of a variable

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Nicholas Wilson via Digitalmars-d
On Friday, 20 July 2018 at 16:39:46 UTC, Dukc wrote: On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it returns an expired stack temporary (*very* bad), or

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 12:51, Jonathan M Davis via Digitalmars-d wrote: > > On Friday, July 20, 2018 12:21:42 Manu via Digitalmars-d wrote: > > I think disabling it is going to be the overwhelmingly niche case, but > > it's good that you can still do it and be satisfied if that's what you > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Elie Morisse via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md Yay! Thank you Manu for taking

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 12:36, Jonathan M Davis via Digitalmars-d wrote: > > On Friday, July 20, 2018 11:50:41 Manu via Digitalmars-d wrote: > > > I am completely against allowing ref to accept rvalues without some sort > > > of attribute indicating that it should be allowed to (e.g. @rvalue > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 12:21:42 Manu via Digitalmars-d wrote: > I think disabling it is going to be the overwhelmingly niche case, but > it's good that you can still do it and be satisfied if that's what you > want to do. > > Can you link me to a single line of your own code where you've used >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 11:50:41 Manu via Digitalmars-d wrote: > > I am completely against allowing ref to accept rvalues without some sort > > of attribute indicating that it should be allowed to (e.g. @rvalue > > ref). > I sincerely hope you're in the minority :( > > > Allowing ref to accept

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 11:05, Jonathan M Davis via Digitalmars-d wrote: > > On Friday, July 20, 2018 17:25:25 Daniel N via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 17:02:04 UTC, Jonathan M Davis wrote: > > > On Friday, July 20, 2018 16:42:54 aliak via Digitalmars-d wrote: > > >> On

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 06:21, Jonathan M Davis via Digitalmars-d wrote: > > On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d wrote: > > This is the feedback thread for the first round of Community > > Review for DIP 1016, "ref T accepts r-values": > > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 05:40, Steven Schveighoffer via Digitalmars-d wrote: > > On 7/20/18 1:16 AM, Mike Parker wrote: > > This is the feedback thread for the first round of Community Review for > > DIP 1016, "ref T accepts r-values": > > > >

Re: hasUDA with this

2018-07-20 Thread Timoses via Digitalmars-d-learn
On Friday, 20 July 2018 at 16:53:12 UTC, jmh530 wrote: Hmm, on that part about the attributes copying their values, I suppose it would be sufficient if I could apply the attributes to a group of declarations. However, it didn't seem to work properly for me with UDAs, and I noticed that even

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 17:25:25 Daniel N via Digitalmars-d wrote: > On Friday, 20 July 2018 at 17:02:04 UTC, Jonathan M Davis wrote: > > On Friday, July 20, 2018 16:42:54 aliak via Digitalmars-d wrote: > >> On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis > >> > >> But as for a UDA,

[Issue 19041] errnoEnforce: example does not compile

2018-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19041 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/b4eacb009dc038175ff08844810d1bdc003ca914 Fix Issue 19041 - errnoEnforce: example does not

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 04:50, Seb via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: > > This is the feedback thread for the first round of Community > > Review for DIP 1016, "ref T accepts r-values": > > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 03:55, Petar via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: > > This is the feedback thread for the first round of Community > > Review for DIP 1016, "ref T accepts r-values": > > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 02:05, Dukc via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: > > This is the feedback thread for the first round of Community > > Review for DIP 1016, "ref T accepts r-values" > > I'd prefer a solution which allows one to make an

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 03:10, Dgame via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: > > On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: > >> appending something (like .byRef or byRef!long, the latter > >> making an implicit type conversion) > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Daniel N via Digitalmars-d
On Friday, 20 July 2018 at 17:02:04 UTC, Jonathan M Davis wrote: On Friday, July 20, 2018 16:42:54 aliak via Digitalmars-d wrote: On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis But as for a UDA, maybe @implicit from the copy constructor DIP can be reused here? void f(@implicit

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Manu via Digitalmars-d
On Fri, 20 Jul 2018 at 02:25, Bastiaan Veelo via Digitalmars-d wrote: > > On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: > > This is the feedback thread for the first round of Community > > Review for DIP 1016, "ref T accepts r-values": > > > >

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 16:42:54 aliak via Digitalmars-d wrote: > On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: > > On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d > > > > wrote: > >> [...] > > > > I am completely against allowing ref to accept rvalues without >

Re: hasUDA with this

2018-07-20 Thread jmh530 via Digitalmars-d-learn
On Friday, 20 July 2018 at 14:11:23 UTC, jmh530 wrote: On Friday, 20 July 2018 at 07:25:23 UTC, Simen Kjærås wrote: UDAs apply to symbols. When you pass something to a function, the symbol does not go with the value, and thus that UDA goes away. It's similar to assigning to a different

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread aliak via Digitalmars-d
On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d wrote: [...] I am completely against allowing ref to accept rvalues without some sort of attribute indicating that it should be allowed to (e.g. @rvalue ref).

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-20 Thread Seb via Digitalmars-d-learn
On Friday, 20 July 2018 at 15:33:19 UTC, Radu wrote: On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: I'll go with Seb's suggestion and look at the betterC tests upstream for issues like this. FYI: I made a reboot of the old PR to a new one which just adds the betterC testsuite:

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dukc via Digitalmars-d
On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it returns an expired stack temporary (*very* bad), or allocates with no way to deallocate (bad). How so? It

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dukc via Digitalmars-d
On Friday, 20 July 2018 at 09:24:19 UTC, Bastiaan Veelo wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: Thanks for the effort to make it... I believe Manu will be pleased. Manu is the one who wrote the DIP :-) Though it was Mike :-)

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 15:50:29 meppl via Digitalmars-d wrote: > On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: > > On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d > > > > wrote: > >> ... > > > > ... > > Allowing ref to accept rvalues goes completely against the

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-20 Thread jmh530 via Digitalmars-d-learn
On Friday, 20 July 2018 at 15:20:43 UTC, bachmeier wrote: Can confirm that dpp works to create mex files. Rewriting the mypow2.c example in D: [snip] This sounds really great. I assume if it works with Octave it is very likely to work with Matlab's mex.h without issues (I might get

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread meppl via Digitalmars-d
On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d wrote: ... ... Allowing ref to accept rvalues goes completely against the idea that ref is for passing an object so that it can be mutated and have its result

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 15:18:33 Daniel N via Digitalmars-d wrote: > On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: > > auto ref was already introduced to solve this problem. The > > problem of course is that it requires that the function be > > templated, and while that's often

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Radu via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md All review-related feedback on

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-20 Thread Radu via Digitalmars-d-learn
On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote: [...] Removing some superfluous explicit druntime dependencies from Phobos would be a start. Your (nice) example compiles fine with this 4-lines Phobos hack: [...] Was able to

Re: Is it feasible to slowly rewrite a C++ codebase in D?

2018-07-20 Thread bachmeier via Digitalmars-d-learn
On Wednesday, 20 June 2018 at 18:47:10 UTC, Jordi Gutiérrez Hermoso wrote: Another possibility might be in dlopen'able functions. Currently Octave uses so-called oct functions, which are nothing more than C++ object code that is dynamically loaded by the interpreter at runtime. They are

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Daniel N via Digitalmars-d
On Friday, 20 July 2018 at 13:21:11 UTC, Jonathan M Davis wrote: auto ref was already introduced to solve this problem. The problem of course is that it requires that the function be templated, and while that's often desirable, it's not always a viable option (e.g. it doesn't work with

Re: hasUDA with this

2018-07-20 Thread jmh530 via Digitalmars-d-learn
On Friday, 20 July 2018 at 07:25:23 UTC, Simen Kjærås wrote: UDAs apply to symbols. When you pass something to a function, the symbol does not go with the value, and thus that UDA goes away. It's similar to assigning to a different variable: import std.traits : hasUDA; @("foo")

Re: Trying to use the libclang Dub package

2018-07-20 Thread bachmeier via Digitalmars-d-learn
On Friday, 20 July 2018 at 10:31:44 UTC, Laurent Tréguier wrote: On Thursday, 19 July 2018 at 15:42:02 UTC, bachmeier wrote: Found the problem. The libclang package is looking for /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has libclang.so.1. Creating a symlink in that directory

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 20, 2018 05:16:53 Mike Parker via Digitalmars-d wrote: > This is the feedback thread for the first round of Community > Review for DIP 1016, "ref T accepts r-values": > > https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd > 7/DIPs/DIP1016.md > > All

Re: Disabling struct destructor illegal?

2018-07-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/19/18 4:50 AM, RazvanN wrote: struct A {     int a;     @disable ~this() {} } void main() {     A a = A(2); } Currently, this code yields: Error: destructor `A.~this` cannot be used because it is annotated with @disable I was expecting that disabling the destructor would make it as

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Steven Schveighoffer via Digitalmars-d
On 7/20/18 1:16 AM, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md All review-related feedback on and discussion of

Re: Windows 64-bit import library

2018-07-20 Thread evilrat via Digitalmars-d-learn
On Friday, 20 July 2018 at 04:31:38 UTC, Jordan Wilson wrote: On Friday, 20 July 2018 at 01:34:39 UTC, Mike Parker wrote: On Thursday, 19 July 2018 at 21:43:35 UTC, Jordan Wilson wrote: Is there any way I can generate the appropriate lib? Else I think I'll need to get hold of the proper

Re: Disabling struct destructor illegal?

2018-07-20 Thread Jim Balter via Digitalmars-d-learn
On Thursday, 19 July 2018 at 10:04:34 UTC, RazvanN wrote: On Thursday, 19 July 2018 at 09:50:32 UTC, Jim Balter wrote: On Thursday, 19 July 2018 at 08:50:15 UTC, RazvanN wrote: struct A { int a; @disable ~this() {} } void main() { A a = A(2); } Currently, this code yields:

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Timoses via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: Thanks in advance to all who participate. "It has been noted that is it possible" switch: it <-> is

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Seb via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md All review-related feedback on

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Seb via Digitalmars-d
On Friday, 20 July 2018 at 10:43:54 UTC, Dgame wrote: On Friday, 20 July 2018 at 10:31:48 UTC, Seb wrote: On Friday, 20 July 2018 at 10:08:03 UTC, Dgame wrote: On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Petar via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md All review-related feedback on

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dgame via Digitalmars-d
On Friday, 20 July 2018 at 10:31:48 UTC, Seb wrote: On Friday, 20 July 2018 at 10:08:03 UTC, Dgame wrote: On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending something (like .byRef or byRef!long, the latter making an

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Petar via Digitalmars-d
On Friday, 20 July 2018 at 10:08:03 UTC, Dgame wrote: On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it

Re: Trying to use the libclang Dub package

2018-07-20 Thread Laurent Tréguier via Digitalmars-d-learn
On Thursday, 19 July 2018 at 15:42:02 UTC, bachmeier wrote: Found the problem. The libclang package is looking for /usr/lib/llvm-3.9/lib/libclang.so. For some reason, Ubuntu has libclang.so.1. Creating a symlink in that directory to libclang.so is a solution. Do you have the development

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Seb via Digitalmars-d
On Friday, 20 July 2018 at 10:08:03 UTC, Dgame wrote: On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dgame via Digitalmars-d
On Friday, 20 July 2018 at 09:39:47 UTC, Nicholas Wilson wrote: On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it returns an expired stack temporary (*very* bad), or

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Nicholas Wilson via Digitalmars-d
On Friday, 20 July 2018 at 08:12:00 UTC, Dominikus Dittes Scherkl wrote: On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values":

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Nicholas Wilson via Digitalmars-d
On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: appending something (like .byRef or byRef!long, the latter making an implicit type conversion) That can't work: either it returns an expired stack temporary (*very* bad), or allocates with no way to deallocate (bad).

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Bastiaan Veelo via Digitalmars-d
On Friday, 20 July 2018 at 09:03:18 UTC, Dukc wrote: Thanks for the effort to make it... I believe Manu will be pleased. Manu is the one who wrote the DIP :-)

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Bastiaan Veelo via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md The only difficulty I had was

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dukc via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values" I'd prefer a solution which allows one to make an invisible temp manually without making a new statement or a new symbol name.

[Issue 19103] Can imports symbols in module to a struct with mixin.

2018-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19103 Robert Schadek changed: What|Removed |Added CC||rburn...@gmail.com --- Comment #2 from

Re: DIP 1016--ref T accepts r-values--Community Review Round 1

2018-07-20 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Friday, 20 July 2018 at 05:16:53 UTC, Mike Parker wrote: This is the feedback thread for the first round of Community Review for DIP 1016, "ref T accepts r-values": https://github.com/dlang/DIPs/blob/725541d69149bc85a9492f7df07360f8e2948bd7/DIPs/DIP1016.md +1 The DIP reduces bloat,

Re: hasUDA with this

2018-07-20 Thread Simen Kjærås via Digitalmars-d-learn
On Thursday, 19 July 2018 at 19:18:43 UTC, jmh530 wrote: However, it seems like hasUDA doesn't seem to produce the result I would have expected here. I tried using getAttributes, but that didn't work either. Am I missing something, or should I submit an enhancement request? UDAs apply to

Re: multiple alias this

2018-07-20 Thread Mike Franklin via Digitalmars-d
On Friday, 20 July 2018 at 00:26:43 UTC, Mr.Bingo wrote: [...] I didn't read through all of that, but just so you are aware, a *multiple alias this* DIP was already approved. You can find it at https://wiki.dlang.org/DIP66 The implementation is already started and you can find it at

[Issue 19096] [REG 2.061] Proper error messages are not shown for templates that go beyond two deep, wrongly says no template overload matches

2018-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19096 --- Comment #1 from Joakim --- Ah, I finally figured out why, if I comment out the last constraint on toImpl, `is(typeof(parse!T(value)))`, I get the right error with `dmd -version=broken shadow.d`: frontend.d(12): Error: variable anydigits is

Re: hasUDA with this

2018-07-20 Thread Timoses via Digitalmars-d-learn
On Thursday, 19 July 2018 at 19:18:43 UTC, jmh530 wrote: I wanted to create a struct with a member function whose behavior was different depending on whether the struct instance had a particular UDA. However, it seems like hasUDA doesn't seem to produce the result I would have expected here.

[Issue 17778] Creating a static array with duplicates in betterC causes "undefined reference to _memset32" linker failure

2018-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17778 Vic Luo changed: What|Removed |Added CC||viclu...@gmail.com --