digitalmars.D - Garbage Collector?
- Ben (7/7) Apr 27 2017 A few days ago i was reading this topic:
- Moritz Maxeiner (17/24) Apr 27 2017 That's subjective, at best.
- Ben (18/32) Apr 27 2017 Frankly seeing in this example that the GC was in theory able to
- ag0aep6g (37/55) Apr 27 2017 You can easily disable automatic collections and trigger one
- Patric Dexheimer (10/10) Apr 27 2017 GC it´s not only about some performance issues that some people
- Moritz Maxeiner (66/103) Apr 27 2017 You replied to the wrong person here, seeing as I did not link to
- Ola Fosheim Grostad (2/6) Apr 27 2017 D offers sound automatic lifetime management? Since when?
- Moritz Maxeiner (4/11) Apr 28 2017 Why are you implicitly adding adjectives to my sentence that
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (2/14) Apr 28 2017 If it isn't sound then it isn't worth mentioning...
- Moritz Maxeiner (3/18) Apr 28 2017 So you claim...
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (8/12) Apr 28 2017 Actually, unsound lifetime management is worse than nothing as
- Moritz Maxeiner (24/37) Apr 28 2017 Actually, applying "sound" or "unsound" to D's GC lifetime
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (7/12) Apr 28 2017 Wrong. This has been discussed and hashed out to death over and
- Moritz Maxeiner (8/19) Apr 28 2017 No. Every single thread I read in the last couple of years ended
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (13/19) Apr 28 2017 He has restated this position many many times... Random snippets:
- Moritz Maxeiner (11/32) Apr 28 2017 I had not read these, thank you :)
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (8/16) Apr 28 2017 There are no example I know of where something has gone into the
- Moritz Maxeiner (6/22) Apr 28 2017 I am aware...
- jmh530 (9/16) Apr 28 2017 To be fair, C++ effectively has multiple pointer types too with
- Ola Fosheim Grostad (6/14) Apr 28 2017 Yes, they are not language types though, so no special effect on
- Atila Neves (4/9) Apr 28 2017 It's true, we did. It was awful.
- H. S. Teoh via Digitalmars-d (6/13) Apr 28 2017 [...]
- Timon Gehr (4/15) Apr 29 2017 I don't doubt that, but the implicit generalization is "multiple pointer...
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (7/10) Apr 29 2017 Yes. In this context it is was more about the GC lifetime
- Moritz Maxeiner (2/25) Apr 29 2017 The "implicit generalization" is your interpretation, though.
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (4/8) Apr 29 2017 No, it was brought up in a thread as an argument against having
- Moritz Maxeiner (12/23) Apr 29 2017 It was brought up in that thread as an example of multiple
- Timon Gehr (8/20) Apr 29 2017 This is not the full story though. Among Walter's constraints for an
- Moritz Maxeiner (14/27) Apr 29 2017 I've dug through what records I know of surrounding these
- Ben (29/95) Apr 28 2017 You seem to be missing the fact that i pointed this out. The fact
- Mike Parker (16/29) Apr 28 2017 How is it ludicrous? The fact that you know the GC will only run
- Moritz Maxeiner (36/74) Apr 28 2017 You wrote about cleaning up *after* the loop, *not* about
- H. S. Teoh via Digitalmars-d (25/46) Apr 28 2017 [...]
- bachmeier (6/13) Apr 28 2017 I usually use the GC, so I have limited knowledge in this area.
- jmh530 (3/9) Apr 28 2017 You can also use automem
- bachmeier (7/18) Apr 28 2017 I'm hoping to put all information in one place. Then when someone
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (5/8) Apr 28 2017 That's nice. Just get your hopes up for it having an effect. One
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (18/23) Apr 28 2017 Typo, I meant "don't"... Sloppy of me. Documentation is nice, but:
- bachmeier (10/36) Apr 29 2017 Many invested in Rust and C++ will look for arguments to support
- Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= (6/14) Apr 29 2017 Of course. It is useful for D-users who are looking for
- H. S. Teoh via Digitalmars-d (30/47) Apr 28 2017 To be honest, in my own D code I'm not overly concerned with the GC, and
- Mike Parker (15/19) Apr 27 2017 Please reread that bit.
- Era Scarecrow (6/11) Apr 27 2017 I find myself trying to use the stack as much as possible for
- bachmeier (6/13) Apr 27 2017 You might find this blog post relevant:
- Jerry (2/18) Apr 27 2017 Citation needed.
A few days ago i was reading this topic: https://news.ycombinator.com/item?id=14165198 And the whole GC keeps coming up as a negative ( compared to Rust ). From my understanding there has been a proposal DIP1000 to address this issue. Is there any update on this topic? Is it possible to run D without the GC AND the standard library?
Apr 27 2017
On Thursday, 27 April 2017 at 15:50:56 UTC, Ben wrote:A few days ago i was reading this topic: https://news.ycombinator.com/item?id=14165198 And the whole GC keeps coming up as a negative ( compared to Rust ).That's subjective, at best. I see most of Rust's ownership mechanics in a negative light (love the lisp-inspired syntax, though), as they incur a severe productivity decrease while providing little safety benefit for /me/ over what I already have in D. But, as always, YMMV.From my understanding there has been a proposal DIP1000 to address this issue.You'll have to be more specific about what issue you're referring to. People not liking garbage collection? In any case, AFAIU DIP1000 was about more mechanically verifiable memory safety features when not using the GC.Is it possible to run D without the GC AND the standard library?It is possible to run a D program without the GC only if you don't allocate using the GC. If you want to see D code that does allocate using the GC, the compiler flag `-vgc` is your friend (compile Phobos with `-vgc` for kicks). Currently, not all of Phobos is free of GC allocations, most notably exceptions (refer to [1] and similar topics) [1] http://forum.dlang.org/thread/occ9kk$24va$1 digitalmars.com
Apr 27 2017
On Thursday, 27 April 2017 at 16:35:57 UTC, Moritz Maxeiner wrote:You'll have to be more specific about what issue you're referring to. People not liking garbage collection? In any case, AFAIU DIP1000 was about more mechanically verifiable memory safety features when not using the GC.Frankly seeing in this example that the GC was in theory able to kick in 6 times in a simple 100 item loop, that is not efficient. I if did my own memory management, the variable cleanup will have been done in one go, right after the loop. Simply more efficient. Been thinking about this topic. Dlang has a destructor, does that means if you allocate on the GC and then do your own destructor, it technically counts as manual memory management? That is assuming the GC removes the memory reference when you ) that referring a variable to be freed only meant the GC freed the memory when it felt like it, not the exact spot when you told it. I personally think that people simple have a bad taste with GC because they kick in too much outside there control. For 90% the default behavior is good but its those 10% that leaves a bad taste with people ( GC on critical moments and hurting performance in return ).Is it possible to run D without the GC AND the standard library?It is possible to run a D program without the GC only if you don't allocate using the GC. If you want to see D code that does allocate using the GC, the compiler flag `-vgc` is your friend (compile Phobos with `-vgc` for kicks). Currently, not all of Phobos is free of GC allocations, most notably exceptions (refer to [1] and similar topics) [1] http://forum.dlang.org/thread/occ9kk$24va$1 digitalmars.com
Apr 27 2017
On Thursday, 27 April 2017 at 19:36:44 UTC, Ben wrote:Frankly seeing in this example that the GC was in theory able to kick in 6 times in a simple 100 item loop, that is not efficient. I if did my own memory management, the variable cleanup will have been done in one go, right after the loop. Simply more efficient.You can easily disable automatic collections and trigger one manually: ---- import core.memory: GC; GC.disable(); /* disable automatic collections */ /* ... do your loop ... */ GC.collect(); /* manually trigger collection */ GC.enable(); /* enable automatic collections */ ----Been thinking about this topic. Dlang has a destructor, does that means if you allocate on the GC and then do your own destructor, it technically counts as manual memory management?I'm not sure what role the destructor supposedly plays here. A destructor is called automatically when the object is freed, or you can call it manually with `object.destroy` [1]. Freeing happens when the object is collected, or you can use `core.memory.GC.free` [2] to free without collecting. Collecting happens automatically, or you can trigger it with `core.memory.GC.collect` [3] as shown. You can use a destructor to manage memory owned by the object. But the destructor being there doesn't affect how the object itself is managed.That is assuming the GC removes the memory reference when you possibly? ) that referring a variable to be freed only meant the GC freed the memory when it felt like it, not the exact spot when you told it.Destroying does not imply freeing. It's the other way around. If you want to free, call `GC.free`. That does count as manual memory management.I personally think that people simple have a bad taste with GC because they kick in too much outside there control. For 90% the default behavior is good but its those 10% that leaves a bad taste with people ( GC on critical moments and hurting performance in return ).You can: 1) Call `core.memory.GC.disable` [4] if you don't want the GC to collect for a while. You should make sure that you don't run out of memory during that time, of course. Use `core.memory.GC.enable` [5] to enable collections again. 2) Use the ` nogc` [6] attribute to forbid GC allocations in a function. GC collections are only triggered by allocations (or manually). So the GC won't kick in during execution of nogc code. [1] https://dlang.org/phobos/object.html#.destroy [2] https://dlang.org/phobos/core_memory.html#.GC.free [3] https://dlang.org/phobos/core_memory.html#.GC.collect [4] https://dlang.org/phobos/core_memory.html#.GC.disable [5] https://dlang.org/phobos/core_memory.html#.GC.enable [6] https://dlang.org/spec/attribute.html#nogc
Apr 27 2017
GC it´s not only about some performance issues that some people may encounter on D, but it its a marketing problem as well. "D is a systems programming language with..." GC(!?). Most people that are interest in D came from c/c++ or other backgrounds without GC or hearing their entire life that GC "may be bad". Its not a question of "how bad it is" or if it is bad at all. People know how to program without GC. So this is just something in the way. Anyway D is awesome.
Apr 27 2017
On Thursday, 27 April 2017 at 19:36:44 UTC, Ben wrote:On Thursday, 27 April 2017 at 16:35:57 UTC, Moritz Maxeiner wrote:You replied to the wrong person here, seeing as I did not link to the article you're referring to, but your statement about not being efficient is, honestly, ludicrous, so I'll reply: Expanding the continuous memory region a dynamic array consists of (possibly moving it) once it overflows has absolutely nothing to do with the GC, or even the language, it's how the abstract data type "dynamic array" is defined. D just does this transparently for you by default. If you already know the exact or maximum size, you can allocate *once* (not 6 times) using `new` and `.reserve` respectively *before* entering the loop, like that article explains in depth.You'll have to be more specific about what issue you're referring to. People not liking garbage collection? In any case, AFAIU DIP1000 was about more mechanically verifiable memory safety features when not using the GC.Frankly seeing in this example that the GC was in theory able to kick in 6 times in a simple 100 item loop, that is not efficient. I if did my own memory management, the variable cleanup will have been done in one go, right after the loop. Simply more efficient.Is it possible to run D without the GC AND the standard library?It is possible to run a D program without the GC only if you don't allocate using the GC. If you want to see D code that does allocate using the GC, the compiler flag `-vgc` is your friend (compile Phobos with `-vgc` for kicks). Currently, not all of Phobos is free of GC allocations, most notably exceptions (refer to [1] and similar topics) [1] http://forum.dlang.org/thread/occ9kk$24va$1 digitalmars.comBeen thinking about this topic. Dlang has a destructor, does that means if you allocate on the GC and then do your own destructor, it technically counts as manual memory management?Um, what? Memory (de)allocation (in C often malloc/free) and object (de)contruction (in C usually functions with some naming conventions like `type_init`/`type_deinit`) are on two entirely different layers! Granted, they are often combined in C to functions with names like `type_new`/`type_free`, but they are conceptually two distinct things. Just to be very clear, here is a primitive diagram of how things work: make object O of type T: <OS> --(allocate N bytes)--> [memory chunk M] --(call constructor T(args) on M)--> [O] dispose of O: [O] --(call destructor ~T() on O)--> [memory chunk M] --(deallocate M)--> <OS> D's garbage collector conceptually changes this to: make object O of type T: <OS> --(GC allocates)--> [GC memory pool] --(allocate N bytes)--> [memory chunk M] --(call constructor T(args) on M)--> [O] dispose of O: [O] --(call destructor ~T() on O)--> [memory chunk M] --(deallocate M)--> [GC memory pool] --(GC deallocates)--> <OS> with the specific restriction that you have *no* control over 'GC deallocates' and only indirect control over 'GC allocates' (by allocating more memory from the GC than is available its the pool). Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC. What you describe is manual object lifetime management (which is what std.conv.emplace and object.destroy exist for) and has no effect on the automatic memory management the GC performs. You *can* do manual memory management *on top* of the GC's memory pool (using core.memory.GC.{alloc/free) or the newer, generic Alloactor interface via std.experimental.allocator.gc_allocator.GCAllocator.{allocate/deallocate}), but these operations will (generally) not yield any observable difference from the OS's perspective.That is assuming the GC removes the memory reference when you possibly? ) that referring a variable to be freed only meant the GC freed the memory when it felt like it, not the exact spot when you told it.Again, you seem to mix object lifetime management and memory management. You cannot tell the GC to free memory back to the operating system (which is what the free syscall does and what you seem to be describing). You can *only* free memory you allocated *from* the GC *back* to the GC. The GC decides when (and if) any memory is ever being freed back to the OS (which is kinda one major point of having a GC in the first place).I personally think that people simple have a bad taste with GC because they kick in too much outside there control.In my experience most people's aversion to GCs can be aptly described by the German proverb "Was der Bauer nicht kennt, das frisst er nicht" (the meaning of which being that most people generally like living in comfort zones and rarely - if ever - dare to leave them of their own free will; that includes developers, sadly).For 90% the default behavior is good but its those 10% that leaves a bad taste with people ( GC on critical moments and hurting performance in return ).Then don't allocate using the GC in such critical pieces of code? If you want automatic verification, annotate a function with nogc (also works with anonymous functions, lambdas, etc); just be aware that not everything in druntime and phobos that could (and should) be annotated currently is (if you encounter any such functions, open a bug report for it so it can be fixed).
Apr 27 2017
On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC.D offers sound automatic lifetime management? Since when?
Apr 27 2017
On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote:On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:Why are you implicitly adding adjectives to my sentence that change its meaning?Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC.D offers sound automatic lifetime management? Since when?
Apr 28 2017
On Friday, 28 April 2017 at 08:25:01 UTC, Moritz Maxeiner wrote:On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote:If it isn't sound then it isn't worth mentioning...On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:Why are you implicitly adding adjectives to my sentence that change its meaning?Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC.D offers sound automatic lifetime management? Since when?
Apr 28 2017
On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 08:25:01 UTC, Moritz Maxeiner wrote:So you claim...On Friday, 28 April 2017 at 04:24:43 UTC, Ola Fosheim Grostad wrote:If it isn't sound then it isn't worth mentioning...On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:Why are you implicitly adding adjectives to my sentence that change its meaning?Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC.D offers sound automatic lifetime management? Since when?
Apr 28 2017
On Friday, 28 April 2017 at 09:02:19 UTC, Moritz Maxeiner wrote:On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote:Actually, unsound lifetime management is worse than nothing as far as correctness goes... so I guess it is worth mentioning as a warning rather than a recommendation. If D had ownership pointers then it would've been possible to sort this out, but D is perpetually locked to the current pointer/GC model for reasons that aren't particularly convincing, i.e. beliefs.If it isn't sound then it isn't worth mentioning...So you claim...
Apr 28 2017
On Friday, 28 April 2017 at 09:12:03 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 09:02:19 UTC, Moritz Maxeiner wrote:Actually, applying "sound" or "unsound" to D's GC lifetime management in general is worse than realizing that whether using it for a specific use case is sound or unsound is entirely dependent on that use case... so I guess it is worth mentioning as a tool a developer should read up on. Also, you seem to imply that I made a recommendation to use the GC's lifetime management. I did not.On Friday, 28 April 2017 at 08:26:28 UTC, Ola Fosheim Grøstad wrote:Actually, unsound lifetime management is worse than nothing as far as correctness goes... so I guess it is worth mentioning as a warning rather than a recommendation.If it isn't sound then it isn't worth mentioning...So you claim...If D had ownership pointers then it would've been possible to sort this out, but D is perpetually locked to the current pointer/GC model for reasons that aren't particularly convincing, i.e. beliefs.I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an informal proposal that *actually deals with _all_ of the issues involved* 2) Developed that informal proposal into a DIP 3) Wrote the implementation and sent a PR Every time it comes up there are ideas, or sometimes even reasonably well formed informal proposals, but none of the proponents ever actually follows up and improves such proposals to the point where all the issues are dealt with. Claiming that D doesn't have ownership mechanics because of beliefs when none of the (vocal) proponents are willing to actually get down to it and *do the work* is, frankly, asinine; do you generally expect people to do things for you they aren't interested in without recompense?
Apr 28 2017
On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote:I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an informal proposal that *actually deals with _all_ of the issues involved*Wrong. This has been discussed and hashed out to death over and over again. The solutions are on the table. Walter's position has always been that having more than a single pointer type is a disaster. That makes further work on it pointless. (Although, arguably, D kinda has several pointer types already).
Apr 28 2017
On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote:No. Every single thread I read in the last couple of years ended with Walter pointing out issues that need to be "hashed out" and then nobody doing it.I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an informal proposal that *actually deals with _all_ of the issues involved*Wrong. This has been discussed and hashed out to death over and over again. The solutions are on the table.Walter's position has always been that having more than a single pointer type is a disaster.None of the threads I've read in the last couple of years regarding that support that claim.That makes further work on it pointless.What you consider worth working on is your business, of course :)
Apr 28 2017
On Friday, 28 April 2017 at 15:43:22 UTC, Moritz Maxeiner wrote:On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote:He has restated this position many many times... Random snippets: «Microsoft's Managed C++ had two pointer types, and it went over like a lead zeppelin. » http://forum.dlang.org/post/mclqt1$1e5n$1 digitalmars.com «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.» http://forum.dlang.org/post/mcnv9u$e8p$1 digitalmars.com You can easily find more... No point in trying to get that into the core language (but it is necessary to get proper destruction of GC managed objects in a reasonable way).Walter's position has always been that having more than a single pointer type is a disaster.None of the threads I've read in the last couple of years regarding that support that claim.
Apr 28 2017
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 15:43:22 UTC, Moritz Maxeiner wrote:I had not read these, thank you :) Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working on them himself); that's not the same as him claiming that it "is a disaster" (in general, which is what you were implying).On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote:He has restated this position many many times... Random snippets: «Microsoft's Managed C++ had two pointer types, and it went over like a lead zeppelin. » http://forum.dlang.org/post/mclqt1$1e5n$1 digitalmars.com «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.» http://forum.dlang.org/post/mcnv9u$e8p$1 digitalmars.comWalter's position has always been that having more than a single pointer type is a disaster.None of the threads I've read in the last couple of years regarding that support that claim.You can easily find more... No point in trying to get that into the core language (but it is necessary to get proper destruction of GC managed objects in a reasonable way).What you consider not pointless is your business, again, but if you don't try to get it in the core language, you have no foundation to complain that's it's not in there.
Apr 28 2017
On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote:Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working on them himself); that's not the same as him claiming that it "is a disaster" (in general, which is what you were implying).There are other threads. This is a recurring topic...What you consider not pointless is your business, again, but if you don't try to get it in the core language, you have no foundation to complain that's it's not in there.There are no example I know of where something has gone into the D language that is going against the aesthetics Walter value... Which isn't surprising. There are also few examples of new features going in at the language level based on external DIPs. Do you have any good examples? (Not standard lib, but language features).
Apr 28 2017
On Friday, 28 April 2017 at 20:21:34 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote:I am aware...Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working on them himself); that's not the same as him claiming that it "is a disaster" (in general, which is what you were implying).There are other threads. This is a recurring topic...I myself know of no examples where people have actually done the work up to and including the point where there were no technical issues left and were then rejected.What you consider not pointless is your business, again, but if you don't try to get it in the core language, you have no foundation to complain that's it's not in there.There are no example I know of where something has gone into the D language that is going against the aesthetics Walter value... Which isn't surprising. There are also few examples of new features going in at the language level based on external DIPs. Do you have any good examples? (Not standard lib, but language features).
Apr 28 2017
On Friday, 28 April 2017 at 20:21:34 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 20:13:58 UTC, Moritz Maxeiner wrote:To be fair, C++ effectively has multiple pointer types too with raw pointers, unique_ptr, shared_ptr, and weak_ptr. However, each of the extra ones has a unique purpose and are opt-in. As a result, people happily use them when it makes their lives easier. By contrast, C++/CLI (I'm more familiar with that than managed C++) has pointer to managed heap and pointer to unmanaged heap. The concepts overlap more.Both of these, however, show only that he doesn't seem to personally like multiple pointer types (and consequently doesn't seem to have any interest in working on them himself); that's not the same as him claiming that it "is a disaster" (in general, which is what you were implying).There are other threads. This is a recurring topic...
Apr 28 2017
On Friday, 28 April 2017 at 21:21:13 UTC, jmh530 wrote:To be fair, C++ effectively has multiple pointer types too with raw pointers, unique_ptr, shared_ptr, and weak_ptr. However, each of the extra ones has a unique purpose and are opt-in. As a result, people happily use them when it makes their lives easier.Yes, they are not language types though, so no special effect on the compiler or runtime. The language types are pointers, &references and &&references.By contrast, C++/CLI (I'm more familiar with that than managed C++) has pointer to managed heap and pointer to unmanaged heap. The concepts overlap more.Yes, and I assume those are language types so that the compiler and runtime can take advantage of it?
Apr 28 2017
On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.»It's true, we did. It was awful. Atila
Apr 28 2017
On Fri, Apr 28, 2017 at 09:50:49PM +0000, Atila Neves via Digitalmars-d wrote:On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:[...] I remember working with that. It was a royal PITA. T -- Those who've learned LaTeX swear by it. Those who are learning LaTeX swear at it. -- Pete BleackleyOn Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.»It's true, we did. It was awful.
Apr 28 2017
On 28.04.2017 23:52, H. S. Teoh via Digitalmars-d wrote:On Fri, Apr 28, 2017 at 09:50:49PM +0000, Atila Neves via Digitalmars-d wrote:I don't doubt that, but the implicit generalization is "multiple pointer types are necessarily always a royal PITA". Not true. scope has worse usability than a scoped pointer type.On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:[...] I remember working with that. It was a royal PITA. TOn Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.»It's true, we did. It was awful.
Apr 29 2017
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:I don't doubt that, but the implicit generalization is "multiple pointer types are necessarily always a royal PITA". Not true. scope has worse usability than a scoped pointer type.Yes. In this context it is was more about the GC lifetime management which requires: 1. The ability to tell the GC about explicit parent-child relationships so that the GC destruction order becomes deterministic. 2. Precise collection.
Apr 29 2017
On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:On 28.04.2017 23:52, H. S. Teoh via Digitalmars-d wrote:The "implicit generalization" is your interpretation, though.On Fri, Apr 28, 2017 at 09:50:49PM +0000, Atila Neves via Digitalmars-d wrote:I don't doubt that, but the implicit generalization is "multiple pointer types are necessarily always a royal PITA".On Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote:[...] I remember working with that. It was a royal PITA. TOn Friday, 28 April 2017 at 19:41:15 UTC, Ola Fosheim Grøstad wrote: «Back in the old DOS days, there were multiple pointer types (near and far). Programmers put up with that because it was the only way, but they HATED HATED HATED it.»It's true, we did. It was awful.
Apr 29 2017
On Saturday, 29 April 2017 at 08:45:26 UTC, Moritz Maxeiner wrote:On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:No, it was brought up in a thread as an argument against having multiple pointer types. The thread was not about near/far pointers or segmented memory models.I don't doubt that, but the implicit generalization is "multiple pointer types are necessarily always a royal PITA".The "implicit generalization" is your interpretation, though.
Apr 29 2017
On Saturday, 29 April 2017 at 09:24:35 UTC, Ola Fosheim Grøstad wrote:On Saturday, 29 April 2017 at 08:45:26 UTC, Moritz Maxeiner wrote:It was brought up in that thread as an example of multiple pointer types having (I assume unintended) negative consequences. That's not the same as implying that *all* occurrences of multiple pointer types *will* have such negative consequences; at most, it implies that you have to be very careful when designing them, so as to avoid such consequences (and this latter part is *my* interpretation).On Saturday, 29 April 2017 at 07:26:45 UTC, Timon Gehr wrote:No, it was brought up in a thread as an argument against having multiple pointer types.I don't doubt that, but the implicit generalization is "multiple pointer types are necessarily always a royal PITA".The "implicit generalization" is your interpretation, though.The thread was not about near/far pointers or segmented memory models.I am aware; it was originally about the viability of automatic reference counting in D, and its potential benefits/drawbacks compared to garbage collection.
Apr 29 2017
On 28.04.2017 17:43, Moritz Maxeiner wrote:On Friday, 28 April 2017 at 14:59:46 UTC, Ola Fosheim Grøstad wrote:This is not the full story though. Among Walter's constraints for an acceptable solution always were: 1. cannot add new syntax 2. cannot add polymorphism to the type system (because it is "hard to understand") 1. is inconvenient and I think what we get with 'scope' is approximately the best one can do given 2.On Friday, 28 April 2017 at 09:40:07 UTC, Moritz Maxeiner wrote:No. Every single thread I read in the last couple of years ended with Walter pointing out issues that need to be "hashed out" and then nobody doing it.I'm sorry, but that's just plain wrong. D does not have ownership pointers because nobody that wants them has stepped up and 1) Done the work of drafting an informal proposal that *actually deals with _all_ of the issues involved*Wrong. This has been discussed and hashed out to death over and over again. The solutions are on the table.
Apr 29 2017
On Saturday, 29 April 2017 at 07:15:36 UTC, Timon Gehr wrote:On 28.04.2017 17:43, Moritz Maxeiner wrote:I've dug through what records I know of surrounding these discussions [1][2][3][4][5] and could not come up with a statement of his that supports this hard-line claim. You may be right, considering that adding new syntax is a non-trivial change, but I'd need the citation.[...] No. Every single thread I read in the last couple of years ended with Walter pointing out issues that need to be "hashed out" and then nobody doing it.This is not the full story though. Among Walter's constraints for an acceptable solution always were: 1. cannot add new syntax2. cannot add polymorphism to the type system (because it is "hard to understand")Same as above. [1] http://lists.puremagic.com/pipermail/dlang-study/ [2] https://forum.dlang.org/thread/kpgilxyyrrluxpepepcg forum.dlang.org [3] https://forum.dlang.org/post/kluaojijixhwigoujeip forum.dlang.org [4] http://forum.dlang.org/thread/oboaa2$17oa$1 digitalmars.com [5] http://forum.dlang.org/thread/nu00a6$t5i$1 digitalmars.com
Apr 29 2017
On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:You replied to the wrong person here, seeing as I did not link to the article you're referring to,Sorry...so I'll reply: Expanding the continuous memory region a dynamic array consists of (possibly moving it) once it overflows has absolutely nothing to do with the GC, or even the language, it's how the abstract data type "dynamic array" is defined. D just does this transparently for you by default. If you already know the exact or maximum size, you can allocate *once* (not 6 times) using `new` and `.reserve` respectively *before* entering the loop, like that article explains in depth.You seem to be missing the fact that i pointed this out. The fact that the GC might have done up to 6 collection rounds in that loop is "ludicrous".Um, what? Memory (de)allocation (in C often malloc/free) and object (de)contruction (in C usually functions with some naming conventions like `type_init`/`type_deinit`) are on two entirely different layers! Granted, they are often combined in C to functions with names like `type_new`/`type_free`, but they are conceptually two distinct things. Just to be very clear, here is a primitive diagram of how things work: make object O of type T: <OS> --(allocate N bytes)--> [memory chunk M] --(call constructor T(args) on M)--> [O] dispose of O: [O] --(call destructor ~T() on O)--> [memory chunk M] --(deallocate M)--> <OS> D's garbage collector conceptually changes this to: make object O of type T: <OS> --(GC allocates)--> [GC memory pool] --(allocate N bytes)--> [memory chunk M] --(call constructor T(args) on M)--> [O] dispose of O: [O] --(call destructor ~T() on O)--> [memory chunk M] --(deallocate M)--> [GC memory pool] --(GC deallocates)--> <OS> with the specific restriction that you have *no* control over 'GC deallocates' and only indirect control over 'GC allocates' (by allocating more memory from the GC than is available its the pool). Working on the memory chunk layer is memory management. Working on the object layer is object lifetime management. D offers you both automatic memory management and automatic lifetime management via its GC. What you describe is manual object lifetime management (which is what std.conv.emplace and object.destroy exist for) and has no effect on the automatic memory management the GC performs. You *can* do manual memory management *on top* of the GC's memory pool (using core.memory.GC.{alloc/free) or the newer, generic Alloactor interface via std.experimental.allocator.gc_allocator.GCAllocator.{allocate/deallocate}), but these operations will (generally) not yield any observable difference from the OS's perspective.I know, i do not express myself very well in English.That is assuming the GC removes the memory reference when you possibly? ) that referring a variable to be freed only meant the GC freed the memory when it felt like it, not the exact spot when you told it.Again, you seem to mix object lifetime management and memory management. You cannot tell the GC to free memory back to the operating system (which is what the free syscall does and what you seem to be describing). You can *only* free memory you allocated *from* the GC *back* to the GC. The GC decides when (and if) any memory is ever being freed back to the OS (which is kinda one major point of having a GC in the first place).In my experience most people's aversion to GCs can be aptly described by the German proverb "Was der Bauer nicht kennt, das frisst er nicht" (the meaning of which being that most people generally like living in comfort zones and rarely - if ever - dare to leave them of their own free will; that includes developers, sadly).Unfortunately i do have plenty of experience with GC kicking in on the wrong moments ( or not at the right moments, people forget that one ). I am sure that the amount of people who develop in GC languages is much bigger these days then manual managed languages ( what is more or less a rarity these days among the new languages ). Even Rust still has some background management going on ( like the byte counter ). Maybe its my opinion only but a good language will not put anything in the way of the developer but will point out mistakes. The Rust compiler is not a bad example but it can be taken a step more. Is it so hard for developers when you declare a variable, to later also clean it up??? var x = 1; // Do work x.free; Easy ... Sure, it becomes a little bit more tricky with ownership but that is where the compiler can help and simply state: "Hey, you forgot this variable, it does not seem to be used beyond this point". Just calling the x.free seem to be too much work for developers these days. Up to now i found very few languages that did this correctly. But this is a offtopic discussion.
Apr 28 2017
On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote:How is it ludicrous? The fact that you know the GC will only run during an allocation, and only if it needs to, allows you to control when those opportunities to collect arise. That's a much more palatable situation than if it were sitting in the background, constantly checking if it needs to collect, then doing so without any input from you. There, you'd have no control at all. In the context of an actual program, the example would only have made 6 collections if you were putting putting heavy pressure on the GC heap, which is an extremely naive way of programming for anyone concerned about performance. D allows you several options to relieve that pressure and assert some control over when the GC can run. Even in a non-GC language, you wouldn't be allocating like that in a performance-critical loop -- you would preallocate before you entered the loop.so I'll reply: Expanding the continuous memory region a dynamic array consists of (possibly moving it) once it overflows has absolutely nothing to do with the GC, or even the language, it's how the abstract data type "dynamic array" is defined. D just does this transparently for you by default. If you already know the exact or maximum size, you can allocate *once* (not 6 times) using `new` and `.reserve` respectively *before* entering the loop, like that article explains in depth.You seem to be missing the fact that i pointed this out. The fact that the GC might have done up to 6 collection rounds in that loop is "ludicrous".
Apr 28 2017
On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote:On Thursday, 27 April 2017 at 22:43:56 UTC, Moritz Maxeiner wrote:You wrote:D just does this transparently for you by default. If you already know the exact or maximum size, you can allocate *once* (not 6 times) using `new` and `.reserve` respectively *before* entering the loop, like that article explains in depth.You seem to be missing the fact that i pointed this out. The fact that the GC might have done up to 6 collection rounds in that loop is "ludicrous".I if did my own memory management, the variable cleanup will have been done in one go, right after the loop. Simply more efficient.You wrote about cleaning up *after* the loop, *not* about allocating *before* the loop. They are semantically related (as allocating with the GC *might* kick off a collection cycle), but not the same thing.In which language(s)? Because in D it's both easy and simple to avoid that (Use nogc or compile with `-vgc` and inspect).In my experience most people's aversion to GCs can be aptly described by the German proverb "Was der Bauer nicht kennt, das frisst er nicht" (the meaning of which being that most people generally like living in comfort zones and rarely - if ever - dare to leave them of their own free will; that includes developers, sadly).Unfortunately i do have plenty of experience with GC kicking in on the wrong moments ( or not at the right moments, people forget that one ).Maybe its my opinion only but a good language will not put anything in the way of the developer but will point out mistakes.Safety properties may be what you're looking for. See safe, that's an area of D a lot of work is currently being done on.The Rust compiler is not a bad example but it can be taken a step more. Is it so hard for developers when you declare a variable, to later also clean it up??? var x = 1; // Do work x.free;If you write it like that, yes, because often it's not just one such make/dispose pair per scope, but multiple, possibly overlapping ones and people make mistakes. And the more complex a piece of code gets the harder it becomes to decipher such pairs and/or decide if the "closing" dispose is missing. This is one of the reasons why scope guards are good: var x = 1; scope (exit) x.free // Do work This, as code becomes more complex, allows for much easier reading (and understanding) of lifetimes.Easy ... Sure, it becomes a little bit more tricky with ownership but that is where the compiler can help and simply state: "Hey, you forgot this variable, it does not seem to be used beyond this point".Since the GC is memory safe by definition (sans bugs) you'd only need this for where you aren't using it. And for the rest I'm not sure it can be done sanely: How's the compiler to know, e.g., which functions from a C API (or C++) you call into allocate or deallocate memory? Introduce yet another keyword or property to signal cross-language memory management? If you ignore cross-language calls and only remain within D, I suppose it might be viable to write a semantic pass for it, but from my perspective, the cross-language calls are the *much* bigger threat to memory safety.Just calling the x.free seem to be too much work for developers these days.In my experience reading about such occurences, this usually happens when the lifetime of the object the memory is used for has become unclear.Up to now i found very few languages that did this correctly.I don't share your assessment of what's correct, but yes, we digress.
Apr 28 2017
On Fri, Apr 28, 2017 at 09:01:03AM +0000, Moritz Maxeiner via Digitalmars-d wrote:On Friday, 28 April 2017 at 07:35:00 UTC, Ben wrote:[...][...] Elephant in the room: D lets you call the C library's malloc() and free(). If you absolute insist that you don't want to use the GC, go right ahead and import core.c.stdlib, and malloc and free away. As mentioned above, D's scope guards will even help you avoid mistakes by keeping allocation and free in the same scope together, i.e., instead of writing: auto x = malloc(...); // do stuff // and more stuff // and more stuff // so many pages of stuff you forgot about x free(x); // very likely you'll forget this by now you could save yourself the bug by writing: auto x = malloc(...); scope(exit) free(x); // ... however many pages of stuff you want, you don't have to // remember to write free() afterwards! Yes, D comes with a GC... doesn't mean you have to use it if you don't want to, though! T -- Doubt is a self-fulfilling prophecy.Is it so hard for developers when you declare a variable, to later also clean it up??? var x = 1; // Do work x.free;If you write it like that, yes, because often it's not just one such make/dispose pair per scope, but multiple, possibly overlapping ones and people make mistakes. And the more complex a piece of code gets the harder it becomes to decipher such pairs and/or decide if the "closing" dispose is missing. This is one of the reasons why scope guards are good: var x = 1; scope (exit) x.free // Do work This, as code becomes more complex, allows for much easier reading (and understanding) of lifetimes.
Apr 28 2017
On Friday, 28 April 2017 at 15:23:18 UTC, H. S. Teoh wrote:you could save yourself the bug by writing: auto x = malloc(...); scope(exit) free(x); // ... however many pages of stuff you want, you don't have to // remember to write free() afterwards! Yes, D comes with a GC... doesn't mean you have to use it if you don't want to, though!I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to using the GC in this scenario? I would like to add this info to the wiki (I don't seen it there).
Apr 28 2017
On Friday, 28 April 2017 at 16:03:18 UTC, bachmeier wrote:I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to using the GC in this scenario? I would like to add this info to the wiki (I don't seen it there).You can also use automem https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
Apr 28 2017
On Friday, 28 April 2017 at 17:06:51 UTC, jmh530 wrote:On Friday, 28 April 2017 at 16:03:18 UTC, bachmeier wrote:I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of their options. There's this page: https://wiki.dlang.org/Memory_Management but that isn't comprehensive or as to-the-point as it needs to be.I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to using the GC in this scenario? I would like to add this info to the wiki (I don't seen it there).You can also use automem https://dlang.org/blog/2017/04/28/automem-hands-free-raii-for-d/
Apr 28 2017
On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote:I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of their options.That's nice. Just get your hopes up for it having an effect. One of the key points of having it in the core distribution (compiler) is for library interoperability. Using multiple solutions ends up in chaos in real world projects...
Apr 28 2017
On Friday, 28 April 2017 at 17:48:47 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote:Typo, I meant "don't"... Sloppy of me. Documentation is nice, but: 1. People will complain that it isn't possible. 2. When possible people will complain that it isn't in the standard library. 3. When in "std" people will complain that not enough libraries use it. 4. When libraries use it people will complain that it doesn't work with older libs. 5. When older libs have been rewritten to support it they will complain that it is better in Rust and C++ and not compatible with Rust and C++. Anyway, my main point is that programmers coming from such languages will most certainly complain if it isn't in the standard library because of interoperability between libraries, but that is basically just the bottom of the hill that you have to climb to get to a level where people stop complaining.I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of their options.That's nice. Just get your hopes up for it having an effect.
Apr 28 2017
On Friday, 28 April 2017 at 19:49:35 UTC, Ola Fosheim Grøstad wrote:On Friday, 28 April 2017 at 17:48:47 UTC, Ola Fosheim Grøstad wrote:Many invested in Rust and C++ will look for arguments to support staying with their language. I've come to the conclusion that the D community is mostly to blame for not making a good case to the other group that are open to D, but for technical reasons or simply personal preference don't like GC, that D is still an option. There's no excuse for not making it easy to evaluate one's options for GC-less programming if we support that style of programming.On Friday, 28 April 2017 at 17:42:18 UTC, bachmeier wrote:Typo, I meant "don't"... Sloppy of me. Documentation is nice, but: 1. People will complain that it isn't possible. 2. When possible people will complain that it isn't in the standard library. 3. When in "std" people will complain that not enough libraries use it. 4. When libraries use it people will complain that it doesn't work with older libs. 5. When older libs have been rewritten to support it they will complain that it is better in Rust and C++ and not compatible with Rust and C++. Anyway, my main point is that programmers coming from such languages will most certainly complain if it isn't in the standard library because of interoperability between libraries, but that is basically just the bottom of the hill that you have to climb to get to a level where people stop complaining.I'm hoping to put all information in one place. Then when someone on Reddit or HN or here starts making claims about the GC, I can give them one link that shows all of their options.That's nice. Just get your hopes up for it having an effect.
Apr 29 2017
On Saturday, 29 April 2017 at 10:54:02 UTC, bachmeier wrote:Many invested in Rust and C++ will look for arguments to support staying with their language. I've come to the conclusion that the D community is mostly to blame for not making a good case to the other group that are open to D, but for technical reasons or simply personal preference don't like GC, that D is still an option. There's no excuse for not making it easy to evaluate one's options for GC-less programming if we support that style of programming.Of course. It is useful for D-users who are looking for alternatives to the GC if written for that group. Finding complete and up to date information is always the biggest challenge for newbies. Just don't expect it to have an effect on reddit users...
Apr 29 2017
On Fri, Apr 28, 2017 at 04:03:18PM +0000, bachmeier via Digitalmars-d wrote:On Friday, 28 April 2017 at 15:23:18 UTC, H. S. Teoh wrote:To be honest, in my own D code I'm not overly concerned with the GC, and even when I am, and want to control when / how often the GC collects, I usually just use GC.disable() and then GC.collect() explicitly. I've seen performance gains of about 30-40% just by carefully reducing the frequency of GC collections (IMO the default is a bit too eager), but of course that depends on exactly what your application is doing. In my case, that was in the context of batch-oriented, CPU-intensive computations that allocate often and mostly keeps live data. YMMV if your program is doing something else or has other patterns of memory access. But my point was that, if you really wanted to, you *could* use C-style memory management in D code. D won't stop you from doing that. The malloc heap is distinct from the GC heap so you won't run into conflicts. Of course, that also means you can't use D features that currently require the GC, such as closures and dynamic arrays. But if you're doing C-style memory management you probably already want to implement your own way of handling array allocations and closure functionality anyway. You can still pass slices of things around to things like Phobos range algorithms (excepting the few that might allocate -- hence marking your code with nogc for the compiler to enforce this), so generally a decent chunk of Phobos should still be usable. Even Phobos itself uses malloc/free directly in several places, for various reasons, so I wouldn't say it's exactly a foreign thing to do in D code.you could save yourself the bug by writing: auto x = malloc(...); scope(exit) free(x); // ... however many pages of stuff you want, you don't have to // remember to write free() afterwards! Yes, D comes with a GC... doesn't mean you have to use it if you don't want to, though!I usually use the GC, so I have limited knowledge in this area. How common is this pattern in D code? Is it better than using reference counted structs? Is there any advantage to using the GC in this scenario?I would like to add this info to the wiki (I don't seen it there).That would be very nice, thanks! T -- Give a man a fish, and he eats once. Teach a man to fish, and he will sit forever.
Apr 28 2017
On Thursday, 27 April 2017 at 19:36:44 UTC, Ben wrote:Frankly seeing in this example that the GC was in theory able to kick in 6 times in a simple 100 item loop, that is not efficient. I if did my own memory management, the variable cleanup will have been done in one go, right after the loop.Please reread that bit. "there were six total GC allocations in the loop. That means there were six opportunities for the GC to collect garbage." Keyword: opportunities. There were six allocations, not six collections. The GC only "kicks in" when it needs to reclaim memory. In this case, the six allocations are made by the array management in DRuntime. It's the same as you allocating with `new` six times. In all of those cases, as long as the GC has room in its pool from which to allocate, there will be no collections. Preallocate as much as possible and minimize the number of GC allocations (allocate on the stack where possible and through malloc where necessary) and the GC is not going to get in the way for most D programs you write.
Apr 27 2017
On Thursday, 27 April 2017 at 19:36:44 UTC, Ben wrote:Frankly seeing in this example that the GC was in theory able to kick in 6 times in a simple 100 item loop, that is not efficient. I if did my own memory management, the variable cleanup will have been done in one go, right after the loop. Simply more efficient.I find myself trying to use the stack as much as possible for buffers and structs so i can control and throw them away properly without worrying about the GC. The downside is they have to be fairly small (at least under windows without forcing it using a new thread or fiber).
Apr 27 2017
On Thursday, 27 April 2017 at 15:50:56 UTC, Ben wrote:A few days ago i was reading this topic: https://news.ycombinator.com/item?id=14165198 And the whole GC keeps coming up as a negative ( compared to Rust ). From my understanding there has been a proposal DIP1000 to address this issue. Is there any update on this topic? Is it possible to run D without the GC AND the standard library?You might find this blog post relevant: http://dlang.org/blog/2017/03/20/dont-fear-the-reaper/ There is opposition to the GC from a small but vocal group of mostly C++ developers. Sometimes they even make valid arguments. You can find many threads on the topic here.
Apr 27 2017
On Thursday, 27 April 2017 at 17:31:42 UTC, bachmeier wrote:On Thursday, 27 April 2017 at 15:50:56 UTC, Ben wrote:Citation needed.A few days ago i was reading this topic: https://news.ycombinator.com/item?id=14165198 And the whole GC keeps coming up as a negative ( compared to Rust ). From my understanding there has been a proposal DIP1000 to address this issue. Is there any update on this topic? Is it possible to run D without the GC AND the standard library?There is opposition to the GC from a small but vocal group of mostly C++ developers. Sometimes they even make valid arguments. You can find many threads on the topic here.
Apr 27 2017