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

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

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

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,

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

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

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.

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

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

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

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

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

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

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

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

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

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

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

D needs...

2015-05-11 Thread Namespace via Digitalmars-d-announce
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

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

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

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

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

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

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

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

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?

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

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-06-02 Thread Steven Schveighoffer via Digitalmars-d-announce
On Sat, 31 May 2014 18:56:17 -0400, Timon Gehr timon.g...@gmx.ch wrote: On 05/30/2014 02:37 PM, Steven Schveighoffer wrote: in which case static if(cond) { immutable: } int x; should not create x as immutable if cond is true. The current behavior is not consistent with attribute either.

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-06-02 Thread Steven Schveighoffer via Digitalmars-d-announce
On Sat, 31 May 2014 19:27:08 -0400, Walter Bright newshou...@digitalmars.com wrote: On 5/30/2014 5:37 AM, Steven Schveighoffer wrote: On Thu, 29 May 2014 21:15:21 -0400, deadalnix deadal...@gmail.com wrote: On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-06-01 Thread Jesse Phillips via Digitalmars-d-announce
On Saturday, 31 May 2014 at 18:12:12 UTC, John Colvin wrote: I think you've misunderstood him. You say in the article D does not provide decltype, he is saying that this is misleading: D does but it's just called typeof instead. No, I understood and had adjusted the article with D does not

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Kagamin via Digitalmars-d-announce
On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm only showing D and talk of C++'s choice. While the rules governing D's behavior are fairly simple I feel that I've expanded on the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Jesse Phillips via Digitalmars-d-announce
On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote: What do you mean D does not provide a decltype? typeof(cx) my_cx2 = cx; I'll blame this on my poor knowledge of C++, at this time typeof in C++ does not appear to compile, in the way I'm trying to use it. I thought using typeof in C++

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread John Colvin via Digitalmars-d-announce
On Saturday, 31 May 2014 at 17:49:18 UTC, Jesse Phillips wrote: On Saturday, 31 May 2014 at 07:32:22 UTC, Kagamin wrote: What do you mean D does not provide a decltype? typeof(cx) my_cx2 = cx; I'll blame this on my poor knowledge of C++, at this time typeof in C++ does not appear to

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Timon Gehr via Digitalmars-d-announce
On 05/30/2014 02:37 PM, Steven Schveighoffer wrote: in which case static if(cond) { immutable: } int x; should not create x as immutable if cond is true. The current behavior is not consistent with attribute either. Ugh, that is really bad. It shouldn't do that. Is that intentional?

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-31 Thread Walter Bright via Digitalmars-d-announce
On 5/30/2014 5:37 AM, Steven Schveighoffer wrote: On Thu, 29 May 2014 21:15:21 -0400, deadalnix deadal...@gmail.com wrote: On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Well... it sorta does. static

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Regan Heath via Digitalmars-d-announce
On Tue, 27 May 2014 22:40:00 +0100, Walter Bright newshou...@digitalmars.com wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say: I could

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Regan Heath via Digitalmars-d-announce
On Thu, 29 May 2014 20:40:10 +0100, Walter Bright newshou...@digitalmars.com wrote: On 5/29/2014 11:25 AM, Dmitry Olshansky wrote: Agreed. The simple dream of automatically decoding UTF and staying Unicode correct is a failure. Yes. Attempting to hide the fact that strings are UTF-8 is

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 5/30/14, 3:53 AM, Andrei Alexandrescu wrote: On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread safety0ff via Digitalmars-d-announce
On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: 1. http://he-the-great.livejournal.com/52333.html Note that in the following code: import core.memory : GC; int* pxprime = cast(int*)GC.malloc(int.sizeof); version(none) assert(pxprime); // possibly zero GC.malloc

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 21:15:21 -0400, deadalnix deadal...@gmail.com wrote: On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Well... it sorta does. static if does not introduce a new scope, even with {},

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Jesse Phillips via Digitalmars-d-announce
On Friday, 30 May 2014 at 10:56:30 UTC, Andrei Alexandrescu wrote: Nice! I'll post it tomorrow on reddit and friends. You have an unmatched brace after assert(a2[].all!(x = x == 0));. Andrei Actually a bunch of unmatched braces (formatter eats the closing one?) and at least one ;; instead

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Jesse Phillips via Digitalmars-d-announce
On Friday, 30 May 2014 at 11:31:18 UTC, safety0ff wrote: On Friday, 30 May 2014 at 04:21:18 UTC, Jesse Phillips wrote: 1. http://he-the-great.livejournal.com/52333.html Note that in the following code: import core.memory : GC; int* pxprime = cast(int*)GC.malloc(int.sizeof);

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-30 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 5/29/14, 9:21 PM, Jesse Phillips wrote: On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Timon Gehr via Digitalmars-d-announce
On 05/29/2014 05:35 AM, Jonathan M Davis via Digitalmars-d-announce wrote: On Wed, 28 May 2014 16:07:08 -0700 Walter Bright via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Some of the inconsistencies you mentioned and Brian mentioned in his talk are actually the result

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jonathan M Davis via Digitalmars-d-announce
On Thu, 29 May 2014 08:23:26 +0200 Timon Gehr via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: In any case, simply reversing the order for static array types using an ad-hoc rewrite rule would be a huge wart, even more severe than the other points you raised, and we

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Ali Çehreli via Digitalmars-d-announce
On 05/29/2014 12:59 AM, Jonathan M Davis via Digitalmars-d-announce wrote: So, unfortunately, I think that we're stuck. You make it sound like there is a problem. ;) I don't see much of an argument for why it makes any sense for static array dimensions be read from right-to-left in

[OT] Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Alix Pexton via Digitalmars-d-announce
On 28/05/2014 2:05 PM, Craig Dillabaugh wrote: On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread via Digitalmars-d-announce
On Thursday, 29 May 2014 at 03:29:31 UTC, Jonathan M Davis via Digitalmars-d-announce wrote: 1. The order of the dimensions of multi-dimensional static arrays is backwards in comparison to what most everyone expects. int[4][5][6] foo; is the same as int foo[6][5][4]; and has the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jonathan M Davis via Digitalmars-d-announce
On Thu, 29 May 2014 01:31:44 -0700 Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 05/29/2014 12:59 AM, Jonathan M Davis via Digitalmars-d-announce wrote: So, unfortunately, I think that we're stuck. You make it sound like there is a problem. ;) I

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jacob Carlborg via Digitalmars-d-announce
On 2014-05-28 16:56, Jesse Phillips wrote: D doesn't have global scope. C++ does not do TLS but that isn't relevant to the no cost position that C++ is taking. Since C++11 there's thread_local. -- /Jacob Carlborg

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Kagamin via Digitalmars-d-announce
On Wednesday, 28 May 2014 at 05:40:26 UTC, Jesse Phillips wrote: When he explained why C++ inferred a const int type as int, he tripped me up because D does drop const for value types. Hmm, this bit me (doesn't compile): void f(in char[] s) { auto s1=s; s1=s; }

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Kagamin via Digitalmars-d-announce
On Thursday, 29 May 2014 at 02:38:56 UTC, Jesse Phillips wrote: Hoping someone can confirm or deny this thought. int x2prime = void; // (at global scope) Since x2prime is module variable, I would expect that the compiler will always initialize this to 0 since there isn't really a

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Leandro Lucarella via Digitalmars-d-announce
Jesse Phillips, el 29 de May a las 02:38 me escribiste: On Wednesday, 28 May 2014 at 04:48:11 UTC, Jesse Phillips wrote: I did a translation of most of the code in the slides. http://dpaste.dzfl.pl/72b5cfcb72e4 I'm planning to transform it into blog post (or series). Right now it just has

Re: [OT] Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 04:57:14 -0400, Alix Pexton alix.dot.pex...@gmail.dot.com wrote: On 28/05/2014 2:05 PM, Craig Dillabaugh wrote: On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Wed, 28 May 2014 22:38:55 -0400, Jesse Phillips jesse.k.phillip...@gmail.com wrote: On Wednesday, 28 May 2014 at 04:48:11 UTC, Jesse Phillips wrote: I did a translation of most of the code in the slides. http://dpaste.dzfl.pl/72b5cfcb72e4 I'm planning to transform it into blog post (or

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Wyatt via Digitalmars-d-announce
On Thursday, 29 May 2014 at 10:01:17 UTC, Jonathan M Davis via Digitalmars-d-announce wrote: ??? C, C++, and D all have multi-dimensional arrays. e.g. int a[5][6]; // C/C++ int[6][5] a; // D int** a; // C/C++ int[][] a; // D int* a[5]; // C/C++ int[5][] a; // D

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Simen Kjærås via Digitalmars-d-announce
On 2014-05-29 03:29, Jonathan M Davis via Digitalmars-d-announce wrote: 1. The order of the dimensions of multi-dimensional static arrays is backwards in comparison to what most everyone expects. int[4][5][6] foo; is the same as int foo[6][5][4]; and has the same dimensions as

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jesse Phillips via Digitalmars-d-announce
On Thursday, 29 May 2014 at 13:11:52 UTC, Steven Schveighoffer wrote: IIRC, the entire section of global TLS data is initialized, and is all contiguous memory, so it would be anti-performant to initialize all but 4 bytes. int x2; float f2; These are both TLS and they init to

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jesse Phillips via Digitalmars-d-announce
On Thursday, 29 May 2014 at 10:41:59 UTC, Kagamin wrote: On Wednesday, 28 May 2014 at 05:40:26 UTC, Jesse Phillips wrote: When he explained why C++ inferred a const int type as int, he tripped me up because D does drop const for value types. Hmm, this bit me (doesn't compile): void f(in

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jesse Phillips via Digitalmars-d-announce
On Thursday, 29 May 2014 at 11:08:03 UTC, Leandro Lucarella wrote: I think void means you don't know what the value is, not is a random value or a value different from the default (which is impossible for stack values, at least if the idea behind void is to avoid the extra runtime cost ;).

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Ali Çehreli via Digitalmars-d-announce
On 05/29/2014 03:00 AM, Jonathan M Davis via Digitalmars-d-announce wrote: On Thu, 29 May 2014 01:31:44 -0700 Ali Çehreli via Digitalmars-d-announce Note that there is no such thing as a multi-dimensional array in C, C++, or D. Hence, there is no reading from any direction; there is a

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 10:20:39 -0400, Jesse Phillips jesse.k.phillip...@gmail.com wrote: On Thursday, 29 May 2014 at 13:11:52 UTC, Steven Schveighoffer wrote: IIRC, the entire section of global TLS data is initialized, and is all contiguous memory, so it would be anti-performant to initialize

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jonathan M Davis via Digitalmars-d-announce
On Thu, 29 May 2014 07:32:48 -0700 Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 05/29/2014 03:00 AM, Jonathan M Davis via Digitalmars-d-announce wrote: I don't see how you could argue that they don't have multi-dimensional arrays. Their specs don't

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2014 7:28 AM, Jesse Phillips wrote: The language docs state, If the Initializer is void, however, the variable is not initialized. Which I suspect is false in the case of module scope and as Steven pointed out, other times doing special don't init is costly. The language does not

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2014 6:11 AM, Steven Schveighoffer wrote: struct X { int a; int b = void; // also initialized to 0. } This is because X must blit an init for a, and it would be silly to go through the trouble of blitting X.init to a, but not b. Especially, for instance, if you had an array of X

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Ali Çehreli via Digitalmars-d-announce
On 05/29/2014 08:22 AM, Jonathan M Davis via Digitalmars-d-announce wrote: On Thu, 29 May 2014 07:32:48 -0700 Ali Çehreli via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On 05/29/2014 03:00 AM, Jonathan M Davis via Digitalmars-d-announce wrote: I don't see how

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 13:12:24 -0400, Walter Bright newshou...@digitalmars.com wrote: On 5/29/2014 6:11 AM, Steven Schveighoffer wrote: struct X { int a; int b = void; // also initialized to 0. } This is because X must blit an init for a, and it would be silly to go through the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Leandro Lucarella via Digitalmars-d-announce
Jesse Phillips, el 29 de May a las 14:28 me escribiste: On Thursday, 29 May 2014 at 11:08:03 UTC, Leandro Lucarella wrote: I think void means you don't know what the value is, not is a random value or a value different from the default (which is impossible for stack values, at least if the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Dmitry Olshansky via Digitalmars-d-announce
29-May-2014 04:58, Walter Bright пишет: On 5/28/2014 5:35 PM, Brian Rogoff wrote: Could you elaborate? Using some of the examples Brian gave, which ones do you think are are mathematically consistent/human inconsistent and which the inverse? Off the top of my head: static if (condition)

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Dmitry Olshansky via Digitalmars-d-announce
29-May-2014 02:10, Jonathan M Davis via Digitalmars-d-announce пишет: On Tue, 27 May 2014 06:42:41 -1000 Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote:

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2014 10:54 AM, Steven Schveighoffer wrote: Has anyone ever considered making the compiler build an 'optimized' init-blitting function instead of just defaulting to memcpy? In other words, the compiler knows at compile time the layout and initialization values of a struct. What about

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Brian Schott via Digitalmars-d-announce
On Thursday, 29 May 2014 at 18:12:10 UTC, Dmitry Olshansky wrote: And no, it doesn't matter how the current frontend implements it, because you can argue next to any decisions this way. When issues like this come up the spec is almost always changed to match the DMD front end instead of the

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 14:11:27 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: 29-May-2014 04:58, Walter Bright пишет: On 5/28/2014 5:35 PM, Brian Rogoff wrote: Could you elaborate? Using some of the examples Brian gave, which ones do you think are are mathematically consistent/human

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Brian Rogoff via Digitalmars-d-announce
On Thursday, 29 May 2014 at 18:52:53 UTC, Brian Schott wrote: On Thursday, 29 May 2014 at 18:12:10 UTC, Dmitry Olshansky wrote: And no, it doesn't matter how the current frontend implements it, because you can argue next to any decisions this way. When issues like this come up the spec is

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Dmitry Olshansky via Digitalmars-d-announce
29-May-2014 23:06, Steven Schveighoffer пишет: On Thu, 29 May 2014 14:11:27 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: 29-May-2014 04:58, Walter Bright пишет: On 5/28/2014 5:35 PM, Brian Rogoff wrote: Could you elaborate? Using some of the examples Brian gave, which ones do you

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 15:24:06 -0400, Dmitry Olshansky dmitry.o...@gmail.com wrote: Let it be just a declaration, as simple as that. Attributes affect other declarations in the scope, static if doesn't. Sure it does: private: int a; int b; equivalent to private int a; private int b;

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Steven Schveighoffer via Digitalmars-d-announce
On Thu, 29 May 2014 15:29:31 -0400, Walter Bright newshou...@digitalmars.com wrote: On 5/29/2014 11:11 AM, Dmitry Olshansky wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Yes, it does make sense. It was not an accident that the frontend treats it as it does,

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2014 11:25 AM, Dmitry Olshansky wrote: Agreed. The simple dream of automatically decoding UTF and staying Unicode correct is a failure. Yes. Attempting to hide the fact that strings are UTF-8 is just doomed. It's like trying to pretend that floating point does not do rounding. It's

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 27 May 2014 at 16:42:35 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/26m8hy/scott_meyers_dconf_2014_keynote_the_last_thing_d/ https://news.ycombinator.com/newest (search that page, if not found click More and search again)

Re: [OT] Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Nick Sabalausky via Digitalmars-d-announce
On 5/29/2014 9:14 AM, Steven Schveighoffer wrote: On Thu, 29 May 2014 04:57:14 -0400, Alix Pexton alix.dot.pex...@gmail.dot.com wrote: I couldn't resist looking up this debate, and its quite a fiery one with no clear winner! There is no clear origin to the phrase and equal arguments for and

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Walter Bright via Digitalmars-d-announce
On 5/29/2014 3:19 PM, Dmitry Olshansky wrote: With the reason being? The same reason you might want to put: @nogc: ... at the beginning of a source module instead of: @nogc: { ... }

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread deadalnix via Digitalmars-d-announce
On Thursday, 29 May 2014 at 19:06:15 UTC, Steven Schveighoffer wrote: Static if is certainly NOT an attribute, it doesn't make any sense. Well... it sorta does. static if does not introduce a new scope, even with {}, and this only happens with attributes. -Steve in which case static

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-29 Thread Jesse Phillips via Digitalmars-d-announce
On Wednesday, 28 May 2014 at 07:21:56 UTC, dennis luehring wrote: woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html I've got two posts complete[1]. Since C++ and D are exactly the same for the majority of the code I'm

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Walter Bright via Digitalmars-d-announce
On 5/27/2014 10:40 PM, Jesse Phillips wrote: When he explained why C++ inferred a const int type as int, he tripped me up because D does drop const for value types. But D does the simple to explain thing, may not be the expected thing (seen questions about it in D.learn), but it is simple to

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread dennis luehring via Digitalmars-d-announce
woudl be nice to have some sort of example by example comparison or as an extension to the page http://dlang.org/cpptod.html Am 28.05.2014 07:40, schrieb Jesse Phillips: On Wednesday, 28 May 2014 at 05:30:18 UTC, Philippe Sigaud via Digitalmars-d-announce wrote: I did a translation of most of

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Rene Zwanenburg via Digitalmars-d-announce
] http://www.gamedev.net/topic/657103-scott-meyers-the-last-thing-d-needs/

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread John Colvin via Digitalmars-d-announce
On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say: I could care less. when they mean:

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Craig Dillabaugh via Digitalmars-d-announce
On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say: I could care less. when they mean:

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread anonymous_me via Digitalmars-d-announce
On Wed, 28 May 2014 04:48:09 +, Jesse Phillips wrote: On Tuesday, 27 May 2014 at 16:42:35 UTC, Andrei Alexandrescu wrote: http://www.reddit.com/r/programming/comments/26m8hy/scott_meyers_dconf_2014_keynote_the_last_thing_d/ https://news.ycombinator.com/newest (search that page, if not

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Jesse Phillips via Digitalmars-d-announce
On Wednesday, 28 May 2014 at 14:39:53 UTC, anonymous_me wrote: The first line: int x2; // (at global scope) The x2 resides in Thread Local Storage (TLS). A __gshared would put it in global scope. Still initialized to int.init which is zero. D doesn't have global scope. C++ does not do

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Andrzej Dwojczynski via Digitalmars-d-announce
to post it to slashdot? If not as a news article then maybe in the comments? Andrzej [0] http://www.gamedev.net/topic/657103-scott-meyers-the-last-thing-d-needs/

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Walter Bright via Digitalmars-d-announce
On 5/28/2014 2:28 AM, John Colvin wrote: On Tuesday, 27 May 2014 at 21:40:00 UTC, Walter Bright wrote: On 5/27/2014 2:22 PM, w0rp wrote: I'm actually a native speaker of 25 years and I didn't get it at first. Natural language communicates ideas approximately. What bugs me is when people say:

Re: Scott Meyers' DConf 2014 keynote The Last Thing D Needs

2014-05-28 Thread Jonathan M Davis via Digitalmars-d-announce
On Tue, 27 May 2014 06:42:41 -1000 Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: http://www.reddit.com/r/programming/comments/26m8hy/scott_meyers_dconf_2014_keynote_the_last_thing_d/ https://news.ycombinator.com/newest (search that page, if not

  1   2   >