www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Reference Counting and Static Checker

reply "Suminda Dharmasena" <sirinath1978m gmail.com> writes:
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
Nov 30 2014
next sibling parent reply "Gary Willoughby" <dev nomad.so> writes:
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
Dec 01 2014
parent reply "Suminda Dharmasena" <sirinath1978m gmail.com> writes:
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
Dec 02 2014
next sibling parent "ZombineDev" <valid_email he.re> writes:
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.)
Dec 02 2014
prev sibling parent reply "Meta" <jared771 gmail.com> writes:
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.
Dec 02 2014
parent reply "Suminda Dharmasena" <sirinath1978m gmail.com> writes:
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.
Dec 03 2014
parent "renoX" <renozyx gmail.com> writes:
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..
Dec 04 2014
prev sibling parent "Jonathan Marler" <johnnymarler gmail.com> writes:
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
Dec 01 2014