June 15, 2023
On Thursday, 15 June 2023 at 07:07:18 UTC, Walter Bright wrote:
> On 6/8/2023 10:20 AM, Johan wrote:
>> - Intentional change of behaviour, sometimes without clear solution path or with buggy solutions. https://issues.dlang.org/show_bug.cgi?id=23966 and 23977 for recent examples.
>
> I suggest:
>
> Restore the old getAttributes behavior, and create a new getAttributes2 with the new behavior.
>
> Will that work for you?

Weka is using its own fork of the compiler (*), so indeed this is what I had tried, but Phobos was also adjusted and I try to stick to "no Phobos modifications" to prevent diverging even further from upstream.
I'll think I'll settle on the workaround as suggested in the bug report (assuming it works out for us).

-Johan

(*) because we have such reverts / cherry-picks
June 15, 2023
On 6/14/2023 7:44 PM, Chris Katko wrote:
> Tell any other object about yourself in the constructor? segfault. Because your object isn't constructed till _after_ the constructor runs. There's a gotcha.

All objects are default constructed before the constructor is called.

I'll need an example?
June 15, 2023
On Thursday, June 15, 2023 8:05:21 PM MDT Walter Bright via Digitalmars-d wrote:
> On 6/14/2023 7:44 PM, Chris Katko wrote:
> > Tell any other object about yourself in the constructor? segfault. Because your object isn't constructed till _after_ the constructor runs. There's a gotcha.
> All objects are default constructed before the constructor is called.

Or to be more precise, they're default-initialized before any constructors are called.

- Jonathan M Davis



June 15, 2023
On 6/15/2023 7:45 PM, Jonathan M Davis wrote:
> Or to be more precise, they're default-initialized before any constructors
> are called.

Right. (Good to hear from you!)

June 15, 2023
Option 1 looks pretty good. Letting the user combine it with getOverloads sounds good.
June 16, 2023
On Thursday, June 15, 2023 9:42:11 PM MDT Walter Bright via Digitalmars-d wrote:
> On 6/15/2023 7:45 PM, Jonathan M Davis wrote:
> > Or to be more precise, they're default-initialized before any constructors are called.
>
> Right. (Good to hear from you!)

Well, I've been out of things for a while due to issues with migraines, but they've improved enough that I'm getting back to work now. I don't know how much I'll be dealing with the newsgroup or official D stuff going forward, but I intend to be at least somewhat involved again.

- Jonathan M Davis



June 16, 2023
On 16/06/2023 6:23 PM, Jonathan M Davis wrote:
> Well, I've been out of things for a while due to issues with migraines, but they've improved enough that I'm getting back to work now. I don't know how much I'll be dealing with the newsgroup or official D stuff going forward, but I intend to be at least somewhat involved again.
> 
>   * Jonathan M Davis

Good to hear, I was also wondering what was up.

Also, come join Discord!
June 16, 2023
On Friday, 16 June 2023 at 06:23:00 UTC, Jonathan M Davis wrote:
> On Thursday, June 15, 2023 9:42:11 PM MDT Walter Bright via Digitalmars-d wrote:
>> On 6/15/2023 7:45 PM, Jonathan M Davis wrote:
>> > Or to be more precise, they're default-initialized before any constructors are called.
>>
>> Right. (Good to hear from you!)
>
> Well, I've been out of things for a while due to issues with migraines, but they've improved enough that I'm getting back to work now. I don't know how much I'll be dealing with the newsgroup or official D stuff going forward, but I intend to be at least somewhat involved again.
>
> - Jonathan M Davis

My wife has had crippling migraines for years, like 2 a week, crawling around on the floor crying, heavy duty painkillers to knock her out bad. She started on Ajovy about a year ago and its literally changed her life, she gets maybe 2 a month now. So instead of spending 3 or 4 days a week in bed or recovering from the after affects, she has a couple of days a month where she has to be in bed with the room blacked out.

The neurologist also made her stop taking any pain meds unless it's absolutely desperate, that helped with the day to day headaches she was also getting. So she doesnt take anything unless its a full on migraine.

But the Ajovy stuff is amazing, literally changed her life. It's an injection once a month with an epipen like thing.


June 16, 2023
On Friday, 16 June 2023 at 02:05:21 UTC, Walter Bright wrote:
> On 6/14/2023 7:44 PM, Chris Katko wrote:
>> Tell any other object about yourself in the constructor? segfault. Because your object isn't constructed till _after_ the constructor runs. There's a gotcha.
>
> All objects are default constructed before the constructor is called.
>
> I'll need an example?

I misremembered a bit when summarizing, from this thread last year:

https://forum.dlang.org/post/uvjvtzidbqartwkbbaww@forum.dlang.org

Code works fine when you directly send a reference during construction. But if you access it from an absolute path like module.classinstance.variable it crashes.

That is not something that is obvious, at least to me. If, during construction, I can send a reference to [this] to a called function just fine, but not refer to the same object through its absolute path until after construction, that's counter-intuitive / a gotcha, for me.

Note: on re-reading my old post I see typos that were corrected in my later posts in the thread. To be clear, I'm not referring to module.CLASSTYPE.variable anywhere. It's module.classInstance.variable.


June 16, 2023
On Friday, 16 June 2023 at 08:55:11 UTC, claptrap wrote:
> On Friday, 16 June 2023 at 06:23:00 UTC, Jonathan M Davis wrote:
>> On Thursday, June 15, 2023 9:42:11 PM MDT Walter Bright via Digitalmars-d wrote:
>>> On 6/15/2023 7:45 PM, Jonathan M Davis wrote:
>>> > Or to be more precise, they're default-initialized before any constructors are called.
>>>
>>> Right. (Good to hear from you!)
>>
>> Well, I've been out of things for a while due to issues with migraines, but they've improved enough that I'm getting back to work now. I don't know how much I'll be dealing with the newsgroup or official D stuff going forward, but I intend to be at least somewhat involved again.
>>
>> - Jonathan M Davis
>
> My wife has had crippling migraines for years, like 2 a week, crawling around on the floor crying, heavy duty painkillers to knock her out bad. She started on Ajovy about a year ago and its literally changed her life, she gets maybe 2 a month now. So instead of spending 3 or 4 days a week in bed or recovering from the after affects, she has a couple of days a month where she has to be in bed with the room blacked out.
>
> The neurologist also made her stop taking any pain meds unless it's absolutely desperate, that helped with the day to day headaches she was also getting. So she doesnt take anything unless its a full on migraine.
>
> But the Ajovy stuff is amazing, literally changed her life. It's an injection once a month with an epipen like thing.

I feel for you. Start keeping a log of food whenever you have a migraine. Just write down what you ate that day. Many people will find that food triggers migraines. My doctors gave me a list of foods to avoid (or watch). Literally on my wall to my right. It says: Onions (garlic), alcohol, chocolate, aged cheeses, caffeine, nuts, and lastly, cinnamon is one of the most common triggers in the world.

I cut out cinnamon, garlic/onions and my migraines almost disappeared.