Re: Why same pointer type for GC and manual memory?

2019-11-19 Thread IGotD- via Digitalmars-d-learn
On Friday, 15 November 2019 at 11:32:07 UTC, Basile B. wrote: TBH I see your point but D is a system programming language. Even if there's a GC you can also do Manual Memory Mangement (sometimes you'll see "MMM "to refer to that in the forums), RC, and you can also write custom machine code i

Re: Why same pointer type for GC and manual memory?

2019-11-15 Thread Basile B. via Digitalmars-d-learn
On Friday, 15 November 2019 at 10:55:55 UTC, IGotD- wrote: On Friday, 15 November 2019 at 08:58:43 UTC, user1234 wrote: On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote: I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type

Re: Why same pointer type for GC and manual memory?

2019-11-15 Thread IGotD- via Digitalmars-d-learn
On Friday, 15 November 2019 at 08:58:43 UTC, user1234 wrote: On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote: I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type as any other pointer. Doesn't this limit the ability to

Re: Why same pointer type for GC and manual memory?

2019-11-15 Thread user1234 via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote: I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type as any other pointer. Doesn't this limit the ability to change the default GC type? Doesn't this confusion make GC poi

Re: Why same pointer type for GC and manual memory?

2019-11-14 Thread kinke via Digitalmars-d-learn
On Thursday, 14 November 2019 at 01:08:58 UTC, Suleyman wrote: On Wednesday, 13 November 2019 at 16:43:27 UTC, IGotD- wrote: Best example is probably managed C++, an MS extension to C++ which is now deprecated. MS Managed C++ was superseded by C++/CLI[1] which was standardized. They actually

Re: Why same pointer type for GC and manual memory?

2019-11-14 Thread Kagamin via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 16:43:27 UTC, IGotD- wrote: On Wednesday, 13 November 2019 at 15:30:33 UTC, Dukc wrote: I'm not 100% sure what managed pointers mean -Are they so that you can't pass them to unregistered memory? A library solution would likely do -wrap the pointer in a struct

Re: Why same pointer type for GC and manual memory?

2019-11-13 Thread Suleyman via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 16:43:27 UTC, IGotD- wrote: Best example is probably managed C++, an MS extension to C++ which is now deprecated. MS Managed C++ was superseded by C++/CLI[1] which was standardized. They actually retained the special syntax for GC pointers. One of the motivat

Re: Why same pointer type for GC and manual memory?

2019-11-13 Thread IGotD- via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 15:30:33 UTC, Dukc wrote: I'm not 100% sure what managed pointers mean -Are they so that you can't pass them to unregistered memory? A library solution would likely do -wrap the pointer in a struct and make it @system to extract it's pointer as "raw". So you

Re: Why same pointer type for GC and manual memory?

2019-11-13 Thread Dukc via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote: I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type as any other pointer. Doesn't this limit the ability to change the default GC type? What does grabage collector type

Re: Why same pointer type for GC and manual memory?

2019-11-13 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Wednesday, 13 November 2019 at 11:07:12 UTC, IGotD- wrote: I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type as any other pointer. I assume you mean a GC that scans (not ref counting). GC pointers only need to be protected fro

Why same pointer type for GC and manual memory?

2019-11-13 Thread IGotD- via Digitalmars-d-learn
I'm trying to find the rationale why GC pointers (should be names managed pointers) are using the exact same type as any other pointer. Doesn't this limit the ability to change the default GC type? Doesn't this confusion make GC pointers just as unsafe as raw pointers? Has there been any prior