Thread overview
Reference Counting and Static Checker
Dec 01, 2014
Suminda Dharmasena
Dec 01, 2014
Gary Willoughby
Dec 02, 2014
Suminda Dharmasena
Dec 02, 2014
ZombineDev
Dec 02, 2014
Meta
Dec 04, 2014
Suminda Dharmasena
Dec 04, 2014
renoX
Dec 01, 2014
Jonathan Marler
December 01, 2014
Hi,

I am wondering if there is interest in the community to introduce alternatives to GC. E.g. reference counting and a static analysis system which traces allocation / deallocation points which can be used to insert the needed operations transparent to the user.

Suminda
December 01, 2014
On Monday, 1 December 2014 at 07:47:20 UTC, Suminda Dharmasena wrote:
> Hi,
>
> I am wondering if there is interest in the community to introduce alternatives to GC. E.g. reference counting and a static analysis system which traces allocation / deallocation points which can be used to insert the needed operations transparent to the user.
>
> Suminda

There is an effort already under way to make the GC optional and to introduce reference counting. Search the newsgroup there are a few threads about it.

std.allocator ready for some abuse
http://forum.dlang.org/thread/l4btsk$5u8$1@digitalmars.com

Componentizing D's garbage collector
http://forum.dlang.org/thread/lao9fn$1d70$1@digitalmars.com

Next step on reference counting topics
http://forum.dlang.org/thread/lkr5oh$1qol$1@digitalmars.com

Escaping the Tyranny of the GC: std.rcstring, first blood
http://forum.dlang.org/thread/lv5iob$f9h$1@digitalmars.com
December 01, 2014
On Monday, 1 December 2014 at 07:47:20 UTC, Suminda Dharmasena wrote:
> Hi,
>
> I am wondering if there is interest in the community to introduce alternatives to GC. E.g. reference counting and a static analysis system which traces allocation / deallocation points which can be used to insert the needed operations transparent to the user.
>
> Suminda

+1
December 02, 2014
Great. What about Rust like static memory safety analysis. (But transparent to the user.)

On Monday, 1 December 2014 at 08:51:17 UTC, Gary Willoughby wrote:
> On Monday, 1 December 2014 at 07:47:20 UTC, Suminda Dharmasena wrote:
>> Hi,
>>
>> I am wondering if there is interest in the community to introduce alternatives to GC. E.g. reference counting and a static analysis system which traces allocation / deallocation points which can be used to insert the needed operations transparent to the user.
>>
>> Suminda
>
> There is an effort already under way to make the GC optional and to introduce reference counting. Search the newsgroup there are a few threads about it.
>
> std.allocator ready for some abuse
> http://forum.dlang.org/thread/l4btsk$5u8$1@digitalmars.com
>
> Componentizing D's garbage collector
> http://forum.dlang.org/thread/lao9fn$1d70$1@digitalmars.com
>
> Next step on reference counting topics
> http://forum.dlang.org/thread/lkr5oh$1qol$1@digitalmars.com
>
> Escaping the Tyranny of the GC: std.rcstring, first blood
> http://forum.dlang.org/thread/lv5iob$f9h$1@digitalmars.com

December 02, 2014
Here are some additional links to forum discussions about those topics:

+ RFC: scope and borrowing:
http://forum.dlang.org/thread/etjuormplgfbomwdrurp@forum.dlang.org
http://wiki.dlang.org/User:Schuetzm/scope

+ On heap segregation, GC optimization and @nogc relaxing:
http://forum.dlang.org/thread/kpgilxyyrrluxpepepcg@forum.dlang.org

+ Scope and Ref and Borrowing:
http://forum.dlang.org/thread/m43le2$28m9$1@digitalmars.com

On Tuesday, 2 December 2014 at 14:41:20 UTC, Suminda Dharmasena wrote:
> Great. What about Rust like static memory safety analysis. (But transparent to the user.)
December 02, 2014
On Tuesday, 2 December 2014 at 14:41:20 UTC, Suminda Dharmasena wrote:
> Great. What about Rust like static memory safety analysis. (But transparent to the user.)

I wouldn't say Rust's method of statically checked memory safety is exactly transparent. You have to do some weird contortions to express many common idioms, or your code won't compile.
December 04, 2014
What I am saying is, if it is introduced in D it should be more flexible than Rust.

On Tuesday, 2 December 2014 at 21:01:58 UTC, Meta wrote:
> On Tuesday, 2 December 2014 at 14:41:20 UTC, Suminda Dharmasena wrote:
>> Great. What about Rust like static memory safety analysis. (But transparent to the user.)
>
> I wouldn't say Rust's method of statically checked memory safety is exactly transparent. You have to do some weird contortions to express many common idioms, or your code won't compile.

December 04, 2014
On Thursday, 4 December 2014 at 06:24:35 UTC, Suminda Dharmasena wrote:
> What I am saying is, if it is introduced in D it should be more flexible than Rust.

This isn't the first post of you who makes me think that you're a troll but I'll answer anyway.
Having types for static memory safety analysis is, by definition, not transparent and not flexible either, so it's unlikely that if D ever implements this feature it will be much different from what Rust provide.

There can still be interesting differences (syntax), scope (Rust use block scope currently but this will probably change), but they are quite minor..