May 23, 2013
On 23 maj 2013, at 16:01, Kenji Hara <k.hara.pg@gmail.com> wrote:

> Honestly, issue 10142 contains a kind of enhancement.
> 
> From 2.063, all of enum values and enum members are internally wrapped by VarDeclaration to make UDA for them workable (== fixing issue 9652). But currently dmd disables abstract/override/final attribute for enum variable declarations.
> 
> class C {
>     override enum int x1 = 1;   // currently NG
>     abstract enum int x2 = 1;   // currently NG
>     final enum int x3 = 1;   // currently NG
> 
> But I think this is unnecessary limitation. Relax such limitation would automatically your first enum issue. So 10142 contains both regression fix and enhancement.
> 
> Note that the enhancement never break currently accepted code.

I don't understand how an attribute can affect the enum declaration. Anyway, as long as it gets fixed or there's a solution I'm happy :)

Thanks again.

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 5/23/13 11:52 AM, Steven Schveighoffer wrote:
> Regarding the current controversy on the NG (and in this mailing list) on const/immutable members with initializers, I would like to propose the following compromise (as posted in the NG):
>
> 1. Make a default-initialized const or immutable member an error.  It is not good to allow code with changed semantics (especially of this magnitude) to silently compile without intervention.
> 2. Disable the error with a switch (to allow for the new behavior).  I believe the current solution is to use a switch to *find* the possibly offending usages.  I think an opt-in approach is better.
> 3. In a future release, remove the error.
>
> I reposted here, in case some are not watching that NG thread.

I think this is a sensible course of action.

Andrei
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On May 23, 2013, at 1:35 PM, Jonathan M Davis <jmdavisProg@gmx.com> wrote:

> On Thursday, May 23, 2013 11:52:41 Steven Schveighoffer wrote:
>> 2. Disable the error with a switch
>> (to allow for the new behavior). I believe the current solution is to use
>> a switch to *find* the possibly offending usages. I think an opt-in
>> approach is better.
> 
> The problem with it being opt-in is that it will break people's code without them even having a clue that anything was changed. The change needs to result in actual errors in their code, or they won't have a clue and won't fix their code.

I think there's a misunderstanding here.  The proposal is to cause an error UNLESS you add a switch to the compiler.  In other words, you have to opt-in to get the new behavior.

Doing nothing, just running your existing build command, you get an error.  Then you have to either:

a) fix all the locations, moving them to static (or realizing your code had a huge bug originally because you thought that was an actual member)
b) if you plan on using the new feature, add the -enableNewFeature switch (name obviously TBD).

The error message should be something like:

Error: initializing a const instance member needs -enableNewFeature compiler switch, or must be changed to static.

-Steve

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 5/23/2013 2:57 AM, Jacob Carlborg wrote:
> On May 23, 2013, at 11:24 AM, Walter Bright <walter@digitalmars.com> wrote:
>
>> I suspect some of these problems are caused by pull #93. To check, compile with:
>>
>>     -transition=field
>>
>> and add "static" to those declarations.
>
> 1. The initial message was still very bad
> 2. I need to know about the -translation flag
> 3. I fixed a couple of errors this flag found but the error message is still bad:
>
> tango/io/selector/SelectSelector.d(115): tango.io.selector.SelectSelector.SelectSelector.DefaultSize is const field
>
> https://github.com/SiegeLord/Tango-D2/blob/d2port/tango/io/selector/PollSelector.d#L115
>
> That is pointing to a commented line.
>
>> On May 21, 2013, at 10:35 PM, Walter Bright <walter@digitalmars.com> wrote: This message can happen if opAssign is generated, but the generated function failed to compile.
>
> Since the function doesn't exist in the source file it's quite hard to find the actual error.

I agree. But did adding 'static' to eliminate the -transition=field issues make the message go away?


May 23, 2013
I want to thank Kenji for his awesomely quick and accurate response to this.

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On Thursday, May 23, 2013 12:17:34 Walter Bright wrote:
> I want to thank Kenji for his awesomely quick and accurate response to this.

Kenji is one of our greatest assets. We can never thank him enough. He does so much so fast that it's scary sometimes. :)

- Jonathan M Davis
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 23 maj 2013, at 21:14, Walter Bright <walter@digitalmars.com> wrote:

> I agree. But did adding 'static' to eliminate the -transition=field issues make the message go away?


Yes, it did, thanks.

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 23 maj 2013, at 21:17, Walter Bright <walter@digitalmars.com> wrote:

> I want to thank Kenji for his awesomely quick and accurate response to this.


Absolutely, a big thanks.

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 5/23/2013 12:25 PM, Jacob Carlborg wrote:
> On 23 maj 2013, at 21:14, Walter Bright <walter@digitalmars.com> wrote:
>
>> I agree. But did adding 'static' to eliminate the -transition=field issues make the message go away?
>
> Yes, it did, thanks.
>

Thank you, this is a very important data point.
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta

May 23, 2013
On 05/21/2013 10:35 PM, Walter Bright wrote:
> http://ftp.digitalmars.com/dmd2beta.zip
>
> Remaining regressions:
>
> http://d.puremagic.com/issues/buglist.cgi?query_format=advanced&bug_severity=regression&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta@puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta

While the phobos makefile now builds libphobos2.so.0.63.0 and symlinks libphobos2.so / libphobos2.so.0.63. The beta zip contains only libphobos2.so, is that intentional?

-- 
Mike Wey
_______________________________________________
dmd-beta mailing list
dmd-beta@puremagic.com
http://lists.puremagic.com/mailman/listinfo/dmd-beta