Re: D needs...

2015-05-25 Thread Namespace via Digitalmars-d-announce

On Monday, 18 May 2015 at 21:51:49 UTC, Namespace wrote:
Knee-jerk response: if no return attribute on a function it 
should be safe to bind rvalues to ref parameters. Of course 
that's impractical as a default so explicit auto ref would 
be needed. -- Andrei


Would it be to hasty if someone would start implementing auto 
ref for non-templates right now? Or should a more experienced 
user do that? Just in case I can contribute somehow.


I took the liberty to begin with an implementation. Thanks to 
Kenjiis work, it was not too difficult, I had to adjust only the 
changes on the new code base:


https://github.com/Dgame/dmd/tree/auto-ref-for-non-templates

Maybe this could be reviewed as soon as 'return ref' is fully 
implemented.


Re: D needs...

2015-05-21 Thread Daniel Kozak via Digitalmars-d-announce

On Thu, 21 May 2015 17:19:27 +
Namespace via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:

 On Thursday, 21 May 2015 at 15:10:14 UTC, Daniel Kozak wrote:
  On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
  Inspired by ponce idioms list for D I've set up something 
  similar.
  There are some themes in D which come up regulary and are 
  discussed to the vomit. If something is agreed, it gets 
  forgotten sometimes and the theme disappears into oblivion 
  (for a few months :P). To prevent this, I've collected some 
  hot-discussed themes, their history and their current state. I 
  hope this helps to avoid unnecessary discussions in the future 
  and finally cut off these issues (either with an official 
  decision Nope, keep as it is or with an implementation).
 
  I've tried to stay as objective as possible, but if something 
  seems to be too subjective, please let me know, so I can fix 
  it.
 
  http://dgame.github.io/dneeds/
 
  negation of attributes: 
  https://github.com/Kozzi11/dmd/tree/rever_attr
 
 No final(false)? :(

My first local version have final(bool), but after some thoughts I end up
with !final. It is little bit easier to implement and efficient.


Re: D needs...

2015-05-21 Thread Daniel Kozak via Digitalmars-d-announce

On Thu, 21 May 2015 17:19:27 +
Namespace via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:

 On Thursday, 21 May 2015 at 15:10:14 UTC, Daniel Kozak wrote:
  On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
  Inspired by ponce idioms list for D I've set up something 
  similar.
  There are some themes in D which come up regulary and are 
  discussed to the vomit. If something is agreed, it gets 
  forgotten sometimes and the theme disappears into oblivion 
  (for a few months :P). To prevent this, I've collected some 
  hot-discussed themes, their history and their current state. I 
  hope this helps to avoid unnecessary discussions in the future 
  and finally cut off these issues (either with an official 
  decision Nope, keep as it is or with an implementation).
 
  I've tried to stay as objective as possible, but if something 
  seems to be too subjective, please let me know, so I can fix 
  it.
 
  http://dgame.github.io/dneeds/
 
  negation of attributes: 
  https://github.com/Kozzi11/dmd/tree/rever_attr
 
 No final(false)? :(

I will probably implement all variants (final!bool, !final, final(bool),
default), if I have a enought spare time.


Re: D needs...

2015-05-21 Thread Namespace via Digitalmars-d-announce

On Thursday, 21 May 2015 at 19:47:56 UTC, Daniel Kozak wrote:


On Thu, 21 May 2015 19:38:17 +
Meta via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com wrote:



On Thursday, 21 May 2015 at 17:47:02 UTC, Daniel Kozak wrote:
 I will probably implement all variants (final!bool, !final, 
 final(bool),

 default), if I have a enought spare time.

Any plans on turning it into a PR when you're done?


Not so far. But if I will be satisfied with any version I could 
try to make PR.


That would be really kind of you. Negation of attributes and 
rvalue references are the things I miss the most.


Re: D needs...

2015-05-21 Thread Daniel Kozak via Digitalmars-d-announce

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion (for 
a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix it.


http://dgame.github.io/dneeds/


negation of attributes: 
https://github.com/Kozzi11/dmd/tree/rever_attr


Re: D needs...

2015-05-21 Thread Namespace via Digitalmars-d-announce

On Thursday, 21 May 2015 at 17:47:02 UTC, Daniel Kozak wrote:


On Thu, 21 May 2015 17:19:27 +
Namespace via Digitalmars-d-announce 
digitalmars-d-announce@puremagic.com

wrote:


On Thursday, 21 May 2015 at 15:10:14 UTC, Daniel Kozak wrote:
 On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
 Inspired by ponce idioms list for D I've set up something 
 similar.
 There are some themes in D which come up regulary and are 
 discussed to the vomit. If something is agreed, it gets 
 forgotten sometimes and the theme disappears into oblivion 
 (for a few months :P). To prevent this, I've collected some 
 hot-discussed themes, their history and their current 
 state. I hope this helps to avoid unnecessary discussions 
 in the future and finally cut off these issues (either with 
 an official decision Nope, keep as it is or with an 
 implementation).


 I've tried to stay as objective as possible, but if 
 something seems to be too subjective, please let me know, 
 so I can fix it.


 http://dgame.github.io/dneeds/

 negation of attributes: 
 https://github.com/Kozzi11/dmd/tree/rever_attr


No final(false)? :(


I will probably implement all variants (final!bool, !final, 
final(bool),

default), if I have a enought spare time.


All right. I'm curious. ;)


Re: D needs...

2015-05-21 Thread Daniel Kozak via Digitalmars-d-announce

On Thu, 21 May 2015 19:38:17 +
Meta via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote:

 On Thursday, 21 May 2015 at 17:47:02 UTC, Daniel Kozak wrote:
  I will probably implement all variants (final!bool, !final, 
  final(bool),
  default), if I have a enought spare time.
 
 Any plans on turning it into a PR when you're done?

Not so far. But if I will be satisfied with any version I could try to make PR.


Re: D needs...

2015-05-21 Thread Meta via Digitalmars-d-announce

On Thursday, 21 May 2015 at 17:47:02 UTC, Daniel Kozak wrote:
I will probably implement all variants (final!bool, !final, 
final(bool),

default), if I have a enought spare time.


Any plans on turning it into a PR when you're done?


Re: D needs...

2015-05-21 Thread Namespace via Digitalmars-d-announce

On Thursday, 21 May 2015 at 15:10:14 UTC, Daniel Kozak wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion 
(for a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix 
it.


http://dgame.github.io/dneeds/


negation of attributes: 
https://github.com/Kozzi11/dmd/tree/rever_attr


No final(false)? :(


Re: D needs...

2015-05-18 Thread Namespace via Digitalmars-d-announce
Knee-jerk response: if no return attribute on a function it 
should be safe to bind rvalues to ref parameters. Of course 
that's impractical as a default so explicit auto ref would be 
needed. -- Andrei


Would it be to hasty if someone would start implementing auto ref 
for non-templates right now? Or should a more experienced user do 
that? Just in case I can contribute somehow.


Re: D needs...

2015-05-14 Thread Namespace via Digitalmars-d-announce

On Thursday, 14 May 2015 at 13:26:17 UTC, Jack Applegame wrote:

What about mutable references to immutable/shared/const classes?

class A {}

immutable(A)[int] aa;
aa[1] = new immutable A;// doesn't compile

Rebindable!(immutable(A))[int]; // looks like ugly shamefull 
workaround.


You can add it if you want, the site is pure html  css. I'm 
currently busy and it would take a while.


Re: D needs...

2015-05-14 Thread Jack Applegame via Digitalmars-d-announce

What about mutable references to immutable/shared/const classes?

class A {}

immutable(A)[int] aa;
aa[1] = new immutable A;// doesn't compile

Rebindable!(immutable(A))[int]; // looks like ugly shamefull 
workaround.




Re: D needs...

2015-05-12 Thread ponce via Digitalmars-d-announce

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion (for 
a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix it.


http://dgame.github.io/dneeds/


Nice! Especially the discussion links. Would be good to see a 
final-by-default summary too.


Re: D needs...

2015-05-12 Thread Daniel Kozák via Digitalmars-d-announce

On Tue, 12 May 2015 06:39:09 +
ponce via Digitalmars-d-announce digitalmars-d-announce@puremagic.com
wrote:

 On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
  Inspired by ponce idioms list for D I've set up something 
  similar.
  There are some themes in D which come up regulary and are 
  discussed to the vomit. If something is agreed, it gets 
  forgotten sometimes and the theme disappears into oblivion (for 
  a few months :P). To prevent this, I've collected some 
  hot-discussed themes, their history and their current state. I 
  hope this helps to avoid unnecessary discussions in the future 
  and finally cut off these issues (either with an official 
  decision Nope, keep as it is or with an implementation).
 
  I've tried to stay as objective as possible, but if something 
  seems to be too subjective, please let me know, so I can fix it.
 
  http://dgame.github.io/dneeds/
 
 Nice! Especially the discussion links. Would be good to see a 
 final-by-default summary too.
There would be too much discussion links ;-)


Re: D needs...

2015-05-12 Thread Namespace via Digitalmars-d-announce

On Tuesday, 12 May 2015 at 06:39:10 UTC, ponce wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion 
(for a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix 
it.


http://dgame.github.io/dneeds/


Nice! Especially the discussion links. Would be good to see a 
final-by-default summary too.


As you wish: http://dgame.github.io/dneeds/#final-by-default


Re: D needs...

2015-05-12 Thread via Digitalmars-d-announce

On Monday, 11 May 2015 at 17:49:32 UTC, Namespace wrote:
I've read DIP69 and there were a few lines about scope ref. But 
I'm not sure whether I understand everything correct (because 
there is no concrete application example for my case): will 
DIP69 create the possibility to pass rvalues and lvalues alike 
to a function without the abuse of templates? Or did I got that 
wrong?


DIP69 is more or less dead, we're going with a variation of DIP25 
(although that one still has holes).


As for rvalue ref, it would enable them safely, but it is not a 
part of that DIP (or DIP69, AFAICS).


Re: D needs...

2015-05-12 Thread Namespace via Digitalmars-d-announce

On Tuesday, 12 May 2015 at 09:31:13 UTC, Marc Schütz wrote:

On Monday, 11 May 2015 at 17:49:32 UTC, Namespace wrote:
I've read DIP69 and there were a few lines about scope ref. 
But I'm not sure whether I understand everything correct 
(because there is no concrete application example for my 
case): will DIP69 create the possibility to pass rvalues and 
lvalues alike to a function without the abuse of templates? Or 
did I got that wrong?


DIP69 is more or less dead, we're going with a variation of 
DIP25 (although that one still has holes).


As for rvalue ref, it would enable them safely, but it is not a 
part of that DIP (or DIP69, AFAICS).


And I thought for a moment, we have a solution in sight... :)


Re: D needs...

2015-05-12 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 5/12/15 3:09 AM, Namespace wrote:

On Tuesday, 12 May 2015 at 09:31:13 UTC, Marc Schütz wrote:

On Monday, 11 May 2015 at 17:49:32 UTC, Namespace wrote:

I've read DIP69 and there were a few lines about scope ref. But I'm
not sure whether I understand everything correct (because there is no
concrete application example for my case): will DIP69 create the
possibility to pass rvalues and lvalues alike to a function without
the abuse of templates? Or did I got that wrong?


DIP69 is more or less dead, we're going with a variation of DIP25
(although that one still has holes).

As for rvalue ref, it would enable them safely, but it is not a part
of that DIP (or DIP69, AFAICS).


And I thought for a moment, we have a solution in sight... :)


Knee-jerk response: if no return attribute on a function it should be 
safe to bind rvalues to ref parameters. Of course that's impractical as 
a default so explicit auto ref would be needed. -- Andrei




Re: D needs...

2015-05-12 Thread Namespace via Digitalmars-d-announce
Knee-jerk response: if no return attribute on a function it 
should be safe to bind rvalues to ref parameters. Of course 
that's impractical as a default so explicit auto ref would be 
needed. -- Andrei


yay, I'm glad to hear that. :)


Re: D needs...

2015-05-11 Thread Daniel Kozák via Digitalmars-d-announce

On Mon, 11 May 2015 12:24:34 +
weaselcat via Digitalmars-d-announce
digitalmars-d-announce@puremagic.com wrote:

 On Monday, 11 May 2015 at 12:22:34 UTC, Dennis Ritchie wrote:
  On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
  Inspired by ponce idioms list for D I've set up something 
  similar.
  There are some themes in D which come up regulary and are 
  discussed to the vomit. If something is agreed, it gets 
  forgotten sometimes and the theme disappears into oblivion 
  (for a few months :P). To prevent this, I've collected some 
  hot-discussed themes, their history and their current state. I 
  hope this helps to avoid unnecessary discussions in the future 
  and finally cut off these issues (either with an official 
  decision Nope, keep as it is or with an implementation).
 
  I've tried to stay as objective as possible, but if something 
  seems to be too subjective, please let me know, so I can fix 
  it.
 
  http://dgame.github.io/dneeds/
 
  Thanks. Many programmers find fault with this problem:
 
  No problem. But if you have more elements it could be annoying 
  to count them. That's why some D users wanted that the compiler 
  does that for them.
 
  int[$] c = [1, 2, 3]; // the compiler detects the dollar and 
  count the elements for us
 
 +1, I have to go review why this was removed. It's annoying that 
 I have to manually count static arrays.

import std.stdio;

@safe @property auto static_array()
{
static struct _static_array
{
@safe
@property
T[n] s(T, size_t n)(auto ref T[n] values) { return values; }

T[0][n] opIndex(size_t n = T.length, T...)(T items)
{
typeof(return) arr;
foreach (index,item; items)
arr[index] = item;

return (values) { return values; }(arr);//s!(T[0], n)(arr);
}
}

return _static_array();
}

void main() {
auto sa = static_array[4,5,7];
writeln(sa);
}



Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce

On Monday, 11 May 2015 at 12:53:26 UTC, John Colvin wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion 
(for a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix 
it.


http://dgame.github.io/dneeds/


I think in auto length for fixed-length arrays you want
auto c = [1, 2, 3].s;
instead of
int[] c = [1, 2, 3].s;
in order to be as close to the int[$] idea as possible.


Both work, but you may be right... :)


Re: D needs...

2015-05-11 Thread weaselcat via Digitalmars-d-announce

On Monday, 11 May 2015 at 12:22:34 UTC, Dennis Ritchie wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion 
(for a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix 
it.


http://dgame.github.io/dneeds/


Thanks. Many programmers find fault with this problem:

No problem. But if you have more elements it could be annoying 
to count them. That's why some D users wanted that the compiler 
does that for them.


int[$] c = [1, 2, 3]; // the compiler detects the dollar and 
count the elements for us


+1, I have to go review why this was removed. It's annoying that 
I have to manually count static arrays.


Re: D needs...

2015-05-11 Thread Dennis Ritchie via Digitalmars-d-announce

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion (for 
a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix it.


http://dgame.github.io/dneeds/


Thanks. Many programmers find fault with this problem:

No problem. But if you have more elements it could be annoying 
to count them. That's why some D users wanted that the compiler 
does that for them.


int[$] c = [1, 2, 3]; // the compiler detects the dollar and 
count the elements for us


Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce

On Monday, 11 May 2015 at 12:22:34 UTC, Dennis Ritchie wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion 
(for a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix 
it.


http://dgame.github.io/dneeds/


Thanks. Many programmers find fault with this problem:

No problem. But if you have more elements it could be annoying 
to count them. That's why some D users wanted that the compiler 
does that for them.


int[$] c = [1, 2, 3]; // the compiler detects the dollar and 
count the elements for us


Yeah, but the given example shows you an alternative.


Re: D needs...

2015-05-11 Thread John Colvin via Digitalmars-d-announce

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion (for 
a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix it.


http://dgame.github.io/dneeds/


I think in auto length for fixed-length arrays you want
auto c = [1, 2, 3].s;
instead of
int[] c = [1, 2, 3].s;
in order to be as close to the int[$] idea as possible.


Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce

On Monday, 11 May 2015 at 13:21:01 UTC, Timon Gehr wrote:

On 05/11/2015 01:59 PM, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to
the vomit. If something is agreed, it gets forgotten sometimes 
and the
theme disappears into oblivion (for a few months :P). To 
prevent this,
I've collected some hot-discussed themes, their history and 
their
current state. I hope this helps to avoid unnecessary 
discussions in the
future and finally cut off these issues (either with an 
official

decision Nope, keep as it is or with an implementation).

I've tried to stay as objective as possible, but if something 
seems to

be too subjective, please let me know, so I can fix it.

http://dgame.github.io/dneeds/



int[] test() {
return [1, 2, 3].s; // this is stack allocated
}

That's not a very compelling use case. :o)
The stack memory goes right out of scope after having been 
sliced.


Should be better now. ;)
http://dgame.github.io/dneeds/#static-array-literal


Re: D needs...

2015-05-11 Thread Timon Gehr via Digitalmars-d-announce

On 05/11/2015 01:59 PM, Namespace wrote:

Inspired by ponce idioms list for D I've set up something similar.
There are some themes in D which come up regulary and are discussed to
the vomit. If something is agreed, it gets forgotten sometimes and the
theme disappears into oblivion (for a few months :P). To prevent this,
I've collected some hot-discussed themes, their history and their
current state. I hope this helps to avoid unnecessary discussions in the
future and finally cut off these issues (either with an official
decision Nope, keep as it is or with an implementation).

I've tried to stay as objective as possible, but if something seems to
be too subjective, please let me know, so I can fix it.

http://dgame.github.io/dneeds/



int[] test() {
return [1, 2, 3].s; // this is stack allocated
}

That's not a very compelling use case. :o)
The stack memory goes right out of scope after having been sliced.


Re: D needs...

2015-05-11 Thread Vladimir Panteleev via Digitalmars-d-announce

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:

http://dgame.github.io/dneeds/


There seems to be some overlap with some existing wiki pages:

http://wiki.dlang.org/Language_design_discussions

http://wiki.dlang.org/Language_issues


Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce

On Monday, 11 May 2015 at 13:21:01 UTC, Timon Gehr wrote:

On 05/11/2015 01:59 PM, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to
the vomit. If something is agreed, it gets forgotten sometimes 
and the
theme disappears into oblivion (for a few months :P). To 
prevent this,
I've collected some hot-discussed themes, their history and 
their
current state. I hope this helps to avoid unnecessary 
discussions in the
future and finally cut off these issues (either with an 
official

decision Nope, keep as it is or with an implementation).

I've tried to stay as objective as possible, but if something 
seems to

be too subjective, please let me know, so I can fix it.

http://dgame.github.io/dneeds/



int[] test() {
return [1, 2, 3].s; // this is stack allocated
}

That's not a very compelling use case. :o)
The stack memory goes right out of scope after having been 
sliced.


Argh, of course. The return type must be auto. :)


Re: D needs...

2015-05-11 Thread Adam D. Ruppe via Digitalmars-d-announce

On Monday, 11 May 2015 at 13:21:01 UTC, Timon Gehr wrote:
The stack memory goes right out of scope after having been 
sliced.


I hate that static arrays are implicitly sliced. It leads to 
common memory safety bugs in places like that.


Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce

On Monday, 11 May 2015 at 13:51:59 UTC, Vladimir Panteleev wrote:

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:

http://dgame.github.io/dneeds/


There seems to be some overlap with some existing wiki pages:

http://wiki.dlang.org/Language_design_discussions

http://wiki.dlang.org/Language_issues


Nice, I've never seen these pages before. But I have the feeling 
that I'm not the only one. These issues should have top priority 
and these pages should be more visible for other users.


Re: D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce
I've read DIP69 and there were a few lines about scope ref. But 
I'm not sure whether I understand everything correct (because 
there is no concrete application example for my case): will DIP69 
create the possibility to pass rvalues and lvalues alike to a 
function without the abuse of templates? Or did I got that wrong?


Re: D needs...

2015-05-11 Thread rom via Digitalmars-d-announce

D needs manpower ... such a shame there's so few of us...

On Monday, 11 May 2015 at 11:59:02 UTC, Namespace wrote:
Inspired by ponce idioms list for D I've set up something 
similar.
There are some themes in D which come up regulary and are 
discussed to the vomit. If something is agreed, it gets 
forgotten sometimes and the theme disappears into oblivion (for 
a few months :P). To prevent this, I've collected some 
hot-discussed themes, their history and their current state. I 
hope this helps to avoid unnecessary discussions in the future 
and finally cut off these issues (either with an official 
decision Nope, keep as it is or with an implementation).


I've tried to stay as objective as possible, but if something 
seems to be too subjective, please let me know, so I can fix it.


http://dgame.github.io/dneeds/