Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
On 5/30/2014 5:37 AM, Steven Schveighoffer wrote: On Thu, 29 May 2014 21:15:21 -0400, deadalnix 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 {}, and this only happens with attributes. -Steve 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? Yes. Semantic scope and lexical scope are different things. The ':' thing applies to the remaining statements in the lexical scope. 'static if' does not create a new semantic scope, even though the { } suggests it does. There have been several suggestions to make 'static if' apply independently of the rest of the grammar, i.e. allow things like: int static if (cond) * else [ ] foo; // conditionally make foo a pointer or an array I think we can agree that looks awful, but it is the same thing as suggesting that the 'immutable:' above extend outside of its lexical scope. You might ask "why is semantic scope different from lexical scope" and the reason is simply that 'static if' would not be very useful if that were the case.
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
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? enum cond=true; static if(cond){ immutable: } int x; static assert(is(typeof(x)==int)); What is the problem?
Re: DCD 0.3.0-beta1 and DScanner 0.1.0-beta1
sorry, I will repost it's to actual thread.
Re: DCD 0.3.0-beta1 and DScanner 0.1.0-beta1
Sublime integration update http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip Screenshot http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png
Re: New DCD and D-Scanner betas
Sublime integration update http://dynamic.dlang.ru/Files/2014/Sublime-D-integration-plugin-linux-31-05-2014.zip (only for 64 bit system) Screenshot http://dynamic.dlang.ru/Files/2014/87800e29-2dca-49c4-ae79-9f44a2dfe913.png
Arch Linux package for dtest on AUR
I don't know how many people use unit-threaded (https://github.com/atilaneves/unit-threaded) for their tests, and of those how many use Arch Linux, but for anyone else there for who that applies, I added a dtest (https://github.com/atilaneves/dtest) package to the AUR: https://aur.archlinux.org/packages/dtest/ I also did it to learn how to create Arch packages. Atila
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
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 compile, in the way I'm trying to use it. I thought using typeof in C++ would result in the same answer as the deduction auto provides. From that point of view, there is no need for decltype, because typeof already gives you the actual type in D (which will be the same as the type at declaration). 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.
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
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++ would result in the same answer as the deduction auto provides. From that point of view, there is no need for decltype, because typeof already gives you the actual type in D (which will be the same as the type at declaration).
Re: Scott Meyers' DConf 2014 keynote "The Last Thing D Needs"
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 content enough to provide useful information beyond fixing C++'s problems. 1. http://he-the-great.livejournal.com/52333.html What do you mean "D does not provide a decltype"? typeof(cx) my_cx2 = cx;