Why does D rely on a GC?

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 19 10:36:02 PDT 2014


Am 19.08.2014 16:09, schrieb Andrei Alexandrescu:
> On 8/18/14, 11:50 PM, Paulo Pinto wrote:
>> On Monday, 18 August 2014 at 23:48:24 UTC, Ary Borenszweig wrote:
>>> On 8/18/14, 8:51 AM, bearophile wrote:
>>>> Jonathan M Davis:
>>>>
>>>>> The biggest reason is memory safety. With a GC, it's possible to make
>>>>> compiler guarantees about memory safety, whereas with
>>>>> manual memory management, it isn't.
>>>>
>>>> Unless you have a very smart type system and you accept some
>>>> compromises
>>>> (Rust also uses a reference counter some some cases, but I think most
>>>> allocations don't need it).
>>>>
>>>> Bye,
>>>> bearophile
>>>
>>> It's very smart, yes. But it takes half an hour to compile the
>>> compiler itself.
>>
>> The compilation speed is caused by the C++ code in their compiler
>> backend (LLVM), which gets compiled at least twice during the
>> bootstraping process.
>
> Generally speaking how fast is the Rust compiler at compiling Rust files?

A few seconds when following the tutorial examples. I haven't written 
much Rust.

>
>>> And you have to put all those unwrap and types everywhere, I don't
>>> think it's fun or productive that way.
>>
>>
>> There I fully agree. If they don't improve lifetime's usability, I don't
>> see Rust being adopted by average developers.
>
> Could you please substantiate this with a couple of examples?
>
>
> Andrei
>

Discussions like these,

http://www.reddit.com/r/rust/comments/2dmcxs/new_to_rust_trying_to_figure_out_lifetimes/

http://www.reddit.com/r/rust/comments/2ac390/generic_string_literals/

--
Paulo


More information about the Digitalmars-d mailing list