-
-
Notifications
You must be signed in to change notification settings - Fork 416
fix Issue 15219 - Allow Throwable.msg to be calculated lazily #1411
Conversation
d58dff4
to
1b21316
Compare
Ah, this PR found a bug already: |
|
It's tempting to mark |
Actually, we should probably be moving towards something like a sink, for |
Well, I'm not sure that we've ever officially said that overriding As for the sink, @nogc compliance doesn't matter at the moment really when we're talking about exceptions. You have to allocate them anyway. The only time that you can get away with not allocating them is when you pre-allocate them, and that has its own problems. IMHO we should find a way to better support @nogc with exceptions, but that's probably going to require some language changes. Also, Walter and Andrei have talked about moving away from Similarly, What you're proposing here seems like it should work just fine, but I don't know how it will jive with trying to moving away from |
shall we close this now? |
@jmdavis There has been a lot of talk about making exceptions @nogc, which led to discussion about RC classes which in turn led to the lifetime study group. I haven't been following it so not sure what the progress is right now. AFAIU, currently exceptions are the biggest problem for making a lot of Phobos code @nogc. @andralex Well, I opened this PR as a proof of concept and mostly for discussion. Yes, it could be improved as per above discussion. I don't know if that means it should be closed. Either way I would be really interested in hearing your opinion on the matter. Maybe this would be better discussed elsewhere, or maybe not - as too often happens, it could lead to discussions of grandiose redesigns which might never materialise when what is offered here is an improvement we can use now. |
@CyberShadow I expect that Andrei is suggesting that we close this PR, because - for better or worse - #1445 was merged which does something similar - and in fact, it makes it so that And given the changes introduced with #1445, I do think that this PR should be closed, since they do almost the same thing and are essentially in conflict with one another. A wider discussion of how to deal with a rangified |
Hey, I only heard of #1445 now. I wish someone told me about it earlier. But yes, it seems to be nearly identical, so I'm just fine with closing this then. |
https://issues.dlang.org/show_bug.cgi?id=15219
Testing the waters for now.