manual memory management

deadalnix deadalnix at gmail.com
Tue Jan 8 23:22:50 PST 2013


On Wednesday, 9 January 2013 at 07:16:15 UTC, Mehrdad wrote:
> On Wednesday, 9 January 2013 at 07:14:19 UTC, deadalnix wrote:
>> On Wednesday, 9 January 2013 at 07:06:03 UTC, Mehrdad wrote:
>>> On Wednesday, 9 January 2013 at 06:57:34 UTC, deadalnix wrote:
>>>> On Wednesday, 9 January 2013 at 06:56:00 UTC, Mehrdad wrote:
>>>>> On Tuesday, 8 January 2013 at 22:19:56 UTC, Walter Bright 
>>>>> wrote:
>>>>>> One thing I'd add is that a GC is *required* if you want 
>>>>>> to have a language that guarantees memory safety
>>>>>
>>>>>
>>>>>
>>>>> Pardon?  shared_ptr anyone? You can totally have a language 
>>>>> that only provides new/delete facilities and which only 
>>>>> access to memory through managed pointers like 
>>>>> shared_ptr... without a GC. I don't see where a GC is 
>>>>> "required" as you say.
>>>>
>>>> Such a program is guaranteed to have memory leak, unless you 
>>>> add a GC on top of the managed pointers.
>>>
>>> Oh and you should also take a look at Newlisp
>>
>> I certainly wont if you don't even bother explain why I should.
>
> 'cause it's memory-safe LISP and without a GC?

"Sharing of sub-objects among objects, cyclic structures, or 
multiple variables pointing to the same object are not supported 
in newLISP."

Well, you CAN indeed, create a dumbed down language that is 
memory safe and don't require a GC.


More information about the Digitalmars-d mailing list