Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-05 Thread jmh530 via Digitalmars-d
On Friday, 5 January 2018 at 22:09:03 UTC, Petar Kirov [ZombineDev] wrote: It seems you are thinking about this: https://dlang.org/phobos-prerelease/std_experimental_allocator_typed.html Ha, that is exactly what I was thinking of!

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-05 Thread Petar via Digitalmars-d
On Friday, 5 January 2018 at 20:20:04 UTC, jmh530 wrote: On Friday, 5 January 2018 at 03:11:42 UTC, jmh530 wrote: [...] In std.experimental.allocator, I was thinking that in something like GCAllocator you could have the allocate function be a template that changes the behavior based on the

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-05 Thread jmh530 via Digitalmars-d
On Friday, 5 January 2018 at 03:11:42 UTC, jmh530 wrote: It also occurs to me that you could have a region for (completely) const/immutable data (not sure if you need to do this as a subregion within a precise region), assuming the GC can get that information. Transitive const/immutable

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread jmh530 via Digitalmars-d
On Friday, 5 January 2018 at 00:58:12 UTC, Ola Fosheim Grøstad wrote: But if D is going to have a GC and no special code-gen to back it up then it becomes important to stratify/segment the memory into regions where you know that pointers that cross boundaries are limited to something known,

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread Ola Fosheim Grøstad via Digitalmars-d
On Thursday, 4 January 2018 at 20:25:17 UTC, jmh530 wrote: That probably makes Pony easier to compare to D. I was just noting that Rust shares some ownership stuff with Pony. I get your point. Pony is probably closer to Go and Erlang, but nevertheless comparable to what some want from D based

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread jmh530 via Digitalmars-d
On Thursday, 4 January 2018 at 19:18:30 UTC, Ola Fosheim Grostad wrote: On Thursday, 4 January 2018 at 19:04:36 UTC, jmh530 wrote: Pony relates to Rust in terms of what they are trying to accomplish with ownership. Pony's iso reference capability seems to mirror Rust's borrow checker rule that

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread Ola Fosheim Grostad via Digitalmars-d
On Thursday, 4 January 2018 at 19:04:36 UTC, jmh530 wrote: Pony relates to Rust in terms of what they are trying to accomplish with ownership. Pony's iso reference capability seems to mirror Rust's borrow checker rule that you can only have one mutable reference. But Rust isn't using garbage

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread jmh530 via Digitalmars-d
On Wednesday, 3 January 2018 at 22:26:50 UTC, Ola Fosheim Grøstad wrote: E.g. Pony differentiate between different types of "ownership" and can transition between them, so you can go from memory that is isolated to a single pointer, pointers that only know the address but cannot access the

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-04 Thread Mark via Digitalmars-d
On Wednesday, 3 January 2018 at 22:22:12 UTC, Jonathan M Davis wrote: [...] Makes sense. Thanks. I use casting so little that sometimes I forget it exists.

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 3 January 2018 at 22:06:22 UTC, Mark wrote: I don't know much about GCs, but can you explain why that would be necessary? Necessary is perhaps a strong word, but since D will never put restrictions on pointers then you need something else than what Java/C#/JavaScript/Go is

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, January 03, 2018 22:06:22 Mark via Digitalmars-d wrote: > On Wednesday, 3 January 2018 at 21:43:00 UTC, Ola Fosheim Grøstad > > wrote: > > There are many ways to fix this, which has been discussed to > > death before (like thread local garbage collection), but there > > is no real

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Mark via Digitalmars-d
On Wednesday, 3 January 2018 at 21:43:00 UTC, Ola Fosheim Grøstad wrote: There are many ways to fix this, which has been discussed to death before (like thread local garbage collection), but there is no real decision making going on to deal with it. Because to deal with it you should also

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 3 January 2018 at 19:42:32 UTC, Ali wrote: That was not a comment about GC implementations in general, it was about D's GC implementation, check the original post on Quora, and read the statement right before this one, maybe it will make this point clearer I read it when it was

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-03 Thread Ali via Digitalmars-d
On Tuesday, 2 January 2018 at 19:50:55 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: "Overall it could be said that D has the downsides of GC but doesn't enjoy its benefits." Not a true statement. Go does not have long pauses, but it has slightly

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: "Overall it could be said that D has the downsides of GC but doesn't enjoy its benefits." Not a true statement. Go does not have long pauses, but it has slightly slower code and a penalty for interfacing with C. Go also has finalization

Re: Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Mark via Digitalmars-d
On Tuesday, 2 January 2018 at 16:34:25 UTC, Ali wrote: While randomly browsing online, I found this link below https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Andrei-Alexandrescu [...] Yes, it is a great post. I would be

Old Quora post: D vs Go vs Rust by Andrei Alexandrescu

2018-01-02 Thread Ali via Digitalmars-d
While randomly browsing online, I found this link below https://www.quora.com/Which-language-has-the-brightest-future-in-replacement-of-C-between-D-Go-and-Rust-And-Why/answer/Andrei-Alexandrescu This is a post on Quora, with some interesting statements by Andrei himself "Overall it could be