digitalmars.D - betterC and exceptions
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (7/7) Nov 12 2021 What does it take to get some kind of exceptions in betterC?
- Imperatorn (4/11) Nov 12 2021 I think LWDR also tries to solve this.
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (9/11) Nov 12 2021 This? https://github.com/hmmdyl/LWDR
- Elronnd (3/5) Nov 12 2021 I believe C++ uses reference counting.
- Paulo Pinto (3/8) Nov 12 2021 Each compiler does its own way, and on Visual C++'s case it takes
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (9/11) Nov 12 2021 This? https://github.com/hmmdyl/LWDR
- russhy (4/4) Nov 12 2021 betterC doesn't need exception
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (2/6) Nov 12 2021 You mean error codes with throw/catch syntax?
What does it take to get some kind of exceptions in betterC? I would think that it would be sufficient to either limit the size of an exception and provide a fixed size buffer in thread-local-storage (256 bytes). Yes, that means giving up throwing "strings" and retaining old exceptions, but I think that is acceptable for system level programming.
Nov 12 2021
On Friday, 12 November 2021 at 08:44:08 UTC, Ola Fosheim Grøstad wrote:What does it take to get some kind of exceptions in betterC? I would think that it would be sufficient to either limit the size of an exception and provide a fixed size buffer in thread-local-storage (256 bytes). Yes, that means giving up throwing "strings" and retaining old exceptions, but I think that is acceptable for system level programming.I think LWDR also tries to solve this. Maybe a similar approach could be used.
Nov 12 2021
On Friday, 12 November 2021 at 09:04:48 UTC, Imperatorn wrote:I think LWDR also tries to solve this. Maybe a similar approach could be used.This? https://github.com/hmmdyl/LWDR Hm, looks like they add a lot of stuff, but some of it seems to be opt-in. Their plan says they have a working implementation for GDC, but not LDC: https://github.com/hmmdyl/SAoC2021/blob/main/plan.md Ok, let's see what they come up with. The ideal would be to reuse whatever C++ does.
Nov 12 2021
On Friday, 12 November 2021 at 09:13:22 UTC, Ola Fosheim Grøstad wrote:Ok, let's see what they come up with. The ideal would be to reuse whatever C++ does.I believe C++ uses reference counting.
Nov 12 2021
On Saturday, 13 November 2021 at 01:06:00 UTC, Elronnd wrote:On Friday, 12 November 2021 at 09:13:22 UTC, Ola Fosheim Grøstad wrote:Each compiler does its own way, and on Visual C++'s case it takes advantage that Windows supports exceptions at the OS level.Ok, let's see what they come up with. The ideal would be to reuse whatever C++ does.I believe C++ uses reference counting.
Nov 12 2021
On Friday, 12 November 2021 at 09:04:48 UTC, Imperatorn wrote:I think LWDR also tries to solve this. Maybe a similar approach could be used.This? https://github.com/hmmdyl/LWDR Hm, looks like they add a lot of stuff, but some of it seems to be opt-in. Their plan says they have a working implementation for GDC, but not LDC: https://github.com/hmmdyl/SAoC2021/blob/main/plan.md Ok, let's see what they come up with. The ideal would be to reuse whatever C++ does.
Nov 12 2021
betterC doesn't need exception why do you want that? use error codes if that's not enough, let's think about something better than exception
Nov 12 2021
On Friday, 12 November 2021 at 21:25:06 UTC, russhy wrote:betterC doesn't need exception why do you want that? use error codes if that's not enough, let's think about something better than exceptionYou mean error codes with throw/catch syntax?
Nov 12 2021