February 22, 2015
On Sunday, 22 February 2015 at 00:43:47 UTC, Manu wrote:
> I personally think ARC in D is the only way forwards. That is an
> unpopular opinion however... although I think I'm just being realistic
> ;)

I've considered adding support for it in SDC in the future, but man, reading the ARC spec fells like a dive into insanity. I've rarely seen such an overcomplicated system.
February 22, 2015
On Sunday, 22 February 2015 at 02:14:04 UTC, Walter Bright wrote:
> On 2/21/2015 4:43 PM, Manu via Digitalmars-d wrote:
>> D's GC is terrible, and after 6 years hanging out in this place, I
>> have seen precisely zero development on the GC front. Nobody can even
>> imagine, let alone successfully implement a GC that covers realtime
>> use requirements.
>
> Nobody thinks GC is suitable for hard realtime.
>
>
>> On the other hand, if 'scope' is implemented well, D may have some of
>> the best tools in town for quality ARC implementation. There is a
>> visible way forward for quality RC in D, and I think we could do
>> better than Apple.
>
> With 'return ref', which is now implemented, you can create a memory safe RefCounted type. However, nobody has bothered. Are you up for it? :-)

Excuse my ignorance,(I read the DIP btw)
How does 'return ref' address issues like
http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
?
February 22, 2015
On 2/21/2015 10:07 PM, weaselcat wrote:
> Excuse my ignorance,(I read the DIP btw)
> How does 'return ref' address issues like
> http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
> ?

The short answer, is your ref types never expose a raw pointer. They do it all with ref's.
February 22, 2015
On Sunday, 22 February 2015 at 06:37:45 UTC, Walter Bright wrote:
> On 2/21/2015 10:07 PM, weaselcat wrote:
>> Excuse my ignorance,(I read the DIP btw)
>> How does 'return ref' address issues like
>> http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
>> ?
>
> The short answer, is your ref types never expose a raw pointer. They do it all with ref's.

If you don't plan to use any method on objects, I guess that's fine.
February 22, 2015
On Sunday, 22 February 2015 at 06:07:02 UTC, weaselcat wrote:
> On Sunday, 22 February 2015 at 02:14:04 UTC, Walter Bright wrote:
>> On 2/21/2015 4:43 PM, Manu via Digitalmars-d wrote:
>>> D's GC is terrible, and after 6 years hanging out in this place, I
>>> have seen precisely zero development on the GC front. Nobody can even
>>> imagine, let alone successfully implement a GC that covers realtime
>>> use requirements.
>>
>> Nobody thinks GC is suitable for hard realtime.
>>
>>
>>> On the other hand, if 'scope' is implemented well, D may have some of
>>> the best tools in town for quality ARC implementation. There is a
>>> visible way forward for quality RC in D, and I think we could do
>>> better than Apple.
>>
>> With 'return ref', which is now implemented, you can create a memory safe RefCounted type. However, nobody has bothered. Are you up for it? :-)
>
> Excuse my ignorance,(I read the DIP btw)
> How does 'return ref' address issues like
> http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
> ?

Responding to myself, I don't think this actually touches on the issue deadalnix wanted at all.

So I think the
>> With 'return ref', which is now implemented, you can create a memory safe RefCounted type.
is not quite correct... in his usage, anyways. I think this would require DIP69, no?
February 22, 2015
On Sunday, 22 February 2015 at 00:43:47 UTC, Manu wrote:
> On 22 February 2015 at 05:20, JN via Digitalmars-d
> <digitalmars-d@puremagic.com> wrote:
>> https://developer.apple.com/news/?id=02202015a
>>
>> Interesting...
>>
>> Apple is dropping GC in favor of automatic reference counting. What are the
>> benefits of ARC over GC? Is it just about predictability of resource
>> freeing? Would ARC make sense in D?
>
> D's GC is terrible, and after 6 years hanging out in this place, I
> have seen precisely zero development on the GC front. Nobody can even
> imagine, let alone successfully implement a GC that covers realtime
> use requirements.

I lack the skills to be hired by Aonix, but the military seem to think it is ok to put a real time JVM taking care of missile systems.

http://www.spacewar.com/reports/Lockheed_Martin_Selects_Aonix_PERC_Virtual_Machine_For_Aegis_Weapon_System_999.html

They surely have considered the situation "GC was called => where did the missile go".

It doesn't get more real time than that.
February 22, 2015
On 2/21/2015 11:06 PM, deadalnix wrote:
> On Sunday, 22 February 2015 at 06:37:45 UTC, Walter Bright wrote:
>> On 2/21/2015 10:07 PM, weaselcat wrote:
>>> Excuse my ignorance,(I read the DIP btw)
>>> How does 'return ref' address issues like
>>> http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
>>>
>>> ?
>>
>> The short answer, is your ref types never expose a raw pointer. They do it all
>> with ref's.
>
> If you don't plan to use any method on objects, I guess that's fine.

Structs pass the 'this' pointer by ref.
February 22, 2015
On Sunday, 22 February 2015 at 06:37:45 UTC, Walter Bright wrote:
> On 2/21/2015 10:07 PM, weaselcat wrote:
>> Excuse my ignorance,(I read the DIP btw)
>> How does 'return ref' address issues like
>> http://forum.dlang.org/thread/pagpusgpyhlhoipldofs@forum.dlang.org#post-ewuwphzmubtmykfsywuw:40forum.dlang.org
>> ?
>
> The short answer, is your ref types never expose a raw pointer. They do it all with ref's.

And a coroutine cannot hold onto a ref?
February 22, 2015
On Sunday, 22 February 2015 at 02:20:03 UTC, Adam D. Ruppe wrote:
> On Sunday, 22 February 2015 at 02:14:04 UTC, Walter Bright wrote:
>> With 'return ref', which is now implemented, you can create a memory safe RefCounted type. However, nobody has bothered. Are you up for it? :-)
>
> wait what? These things should be on the changelog! You can't really complain that people haven't bothered using a secret feature that 1) doesn't seem to be out of beta yet and 2) isn't listed as a new thing here http://dlang.org/changelog.html

This! What is 'return ref'?
February 22, 2015
Am 22.02.2015 um 03:13 schrieb Walter Bright:
>
> Nobody thinks GC is suitable for hard realtime.

I think you should know manu good enough by now that you know he is not talking about hard realtime but soft realtime instead. (e.g. games) There are GCs which handle this situation pretty well but D's GC is not one of them.