February 03, 2014
On 2014-02-03 04:06:00 +0000, Walter Bright <newshound2@digitalmars.com> said:

> For starters, grep through the source code for all the implicit conversions. Then think about how it fits in with match levels, function overloading, template overloading, partial ordering, ?:, covariance, contravariance, name mangling, TypeInfo, default initialization, will general functions have to be written twice (once for T, again for T?), auto function returns, and that's just off the top of my head.
> 
> It's not just writing a truth table and throwing it over the wall.

But wouldn't that prevent all function arguments from being null at all? As well as function return values? That'll make it almost impossible to port existing code to this new D model, or interface with existing C functions.

It'd still be possible, because you could always use a struct to pass a @nullable pointer around, but then that struct will not work with partial ordering, ?:, covariance, and contravariance, making things quite annoying (just like Rebindable is for tail const/immutable classes).

As for writing functions twice, I don't see it. T is implicitly convertible to T?, so a single function with a T? parameter will work with both T and T? arguments.

-- 
Michel Fortin
michel.fortin@michelf.ca
http://michelf.ca

February 03, 2014
On Monday, 3 February 2014 at 02:58:59 UTC, Manu wrote:
> But D ticks all the boxes, except that one... and it's an important field
> that isn't covered by the rest of the landscape of emerging or trendy
> languages.
>
>>>  I think it's also telling that newcomers constantly raise it as a massive
>>> concern, or even a deal-breaker. Would they feel the same about ARC? I
>>> seriously doubt it. I wonder if a poll is in order...


Agree with Manu 100% there and the rest of his post as well. I imagine standing in that little crowd he talked to.

Anyone asking for the addition of ARC or owning pointers to D, gets pretty much ignored. The topic is "Smart pointers instead of GC?", remember? People here seem to be more interested in diverting to nullable, scope and GC optimization. Telling, indeed.

And, yes, as I posted, I believe one could keep D's syntax unchanged, including GC allocation via new, by changing the memory regime under the hood and providing for ARCs and owning pointers on top of GC. It would be a lot of work taking into account storage classes, type construction, pointer interaction and what not), I understand. But it would be better spent than on more of the same garbage ... err ... collection.

So it's a done deal, then? D didn't go all the way to become a systems or highest performance language? Instead, it wants to grab a piece of that Java / C# pie?

Good luck with that. I don't think those guys are as open to change as the C++ guys, also given the higher complexity (i.e. richness) of D compared to C# / Java.

IMHO, the D implementers should really reconsider what language features they would like to concentrate on if they want to be around in the years to come.
February 03, 2014
On Monday, 3 February 2014 at 14:57:35 UTC, Frank Bauer wrote:
> On Monday, 3 February 2014 at 02:58:59 UTC, Manu wrote:
>> But D ticks all the boxes, except that one... and it's an important field
>> that isn't covered by the rest of the landscape of emerging or trendy
>> languages.
>>
>>>> I think it's also telling that newcomers constantly raise it as a massive
>>>> concern, or even a deal-breaker. Would they feel the same about ARC? I
>>>> seriously doubt it. I wonder if a poll is in order...
>
>
> Agree with Manu 100% there and the rest of his post as well. I imagine standing in that little crowd he talked to.
>
> Anyone asking for the addition of ARC or owning pointers to D, gets pretty much ignored. The topic is "Smart pointers instead of GC?", remember? People here seem to be more interested in diverting to nullable, scope and GC optimization. Telling, indeed.
>
> And, yes, as I posted, I believe one could keep D's syntax unchanged, including GC allocation via new, by changing the memory regime under the hood and providing for ARCs and owning pointers on top of GC. It would be a lot of work taking into account storage classes, type construction, pointer interaction and what not), I understand. But it would be better spent than on more of the same garbage ... err ... collection.
>
> So it's a done deal, then? D didn't go all the way to become a systems or highest performance language? Instead, it wants to grab a piece of that Java / C# pie?
>
> Good luck with that. I don't think those guys are as open to change as the C++ guys, also given the higher complexity (i.e. richness) of D compared to C# / Java.
>
> IMHO, the D implementers should really reconsider what language features they would like to concentrate on if they want to be around in the years to come.

It's pure laziness. That is the hole point of AGC, right? So you
don't have to pay attention to what you are doing.

Just wait. Google is working on it! They are working on cars that
drive themselves so you don't have to. There is no way to
override it. Google decides where you need to go and how fast.
You have no say so in the matter and if you want to take the
scenic route then you'll just have to get out and walk(from a
moving car BTW). If it so happens there is construction work and
you gotta take a detour, well, tell that to the judge or your
insurance company... it's not googles fault for not making the
car smart enough or giving you alternatives(remember, you are too
stupid to know anything).
February 03, 2014
On Monday, 3 February 2014 at 15:09:08 UTC, Frustrated wrote:
> It's pure laziness. That is the hole point of AGC, right? So you
> don't have to pay attention to what you are doing.

Well, aren't we all programmers because we are lazy? Othherwise we would be moving physical stuff around ;)

Certainly, Walter, Andrei and the rest were anything but lazy. Quite the opposite. But considering what they accomplished already, maybe they decide to go that extra mile in the coming years.

I actually enjoy the comfort of a GC cleaning up after me, if I don't have critical stuff to do. Other than that, you are right: if you know what you do in your code and given powerful tools, you can accomplish more (performance).
February 03, 2014
On Sunday, 2 February 2014 at 16:55:35 UTC, Andrei Alexandrescu wrote:
> I think of the following foci for the first half of 2014:
>
> 1. Add @nullable and provide a -nullable compiler flag to verify it. The attribute is inferred locally and for white-box functions (lambdas, templates), and required as annotation otherwise. References not annotated with @nullable are statically enforced to never be null.
>
> 2. Work on Phobos to see what can be done about avoiding unnecessary allocation. Most likely we'll need to also add a @nogc flag.
>
> 3. Work on adding tracing capabilities to allocators and see how to integrate them with the language and Phobos.
>
> 4. Work on the core language and druntime to see how to seamlessly accommodate alternate GC mechanisms such as reference counting.
>
>
> Andrei

This is an excellent direction to take the language in the near-term. It seems that some who would like to use D are afraid of the GC. Others have legitimate use-cases where the effort of manually managing memory is warranted, such as a memory-constrained environment. Being able to accommodate both, provide an integrated approach to allocation, and allow for ref-counting as a viable alternative to GC is a home run. Also will be nice to see Phobos memory usage trimmed down. I feel that these items mentioned above combined will put D into a niche that other languages will find it difficult to compete with: end-to-end fine-grained memory control. Nice!

Just my 10 cents.

Joseph
February 03, 2014
"Frustrated"  wrote in message news:kpejxijjckravodhixpi@forum.dlang.org... 
>
> It's pure laziness.
>

Pull requests welcome.
February 03, 2014
On 2/3/2014 3:45 AM, Michel Fortin wrote:
> As for writing functions twice, I don't see it. T is implicitly convertible to
> T?, so a single function with a T? parameter will work with both T and T?
> arguments.

It's the same issue as with const (which we dealt with by adding the 'inout' qualifier). It's the affect of the argument type on the return type.

February 03, 2014
On 2/3/14, 6:57 AM, Frank Bauer wrote:
> Anyone asking for the addition of ARC or owning pointers to D, gets
> pretty much ignored. The topic is "Smart pointers instead of GC?",
> remember? People here seem to be more interested in diverting to
> nullable, scope and GC optimization. Telling, indeed.

I thought I made it clear that GC avoidance (which includes considering built-in reference counting) is a major focus of 2014.

Andrei

February 03, 2014
On Mon, 03 Feb 2014 12:02:29 -0800, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> On 2/3/14, 6:57 AM, Frank Bauer wrote:
>> Anyone asking for the addition of ARC or owning pointers to D, gets
>> pretty much ignored. The topic is "Smart pointers instead of GC?",
>> remember? People here seem to be more interested in diverting to
>> nullable, scope and GC optimization. Telling, indeed.
>
> I thought I made it clear that GC avoidance (which includes considering built-in reference counting) is a major focus of 2014.
>
> Andrei
>

Andrei, I am sorry to report that anything other than complete removal of the GC and replacement with compiler generated ARC will be unacceptable to a certain, highly vocal, subset of D users. No arguments can be made to otherwise, regardless of validity. As far as they are concerned the discussion of ARC vs. GC is closed and decided. ARC is the only path forward to the bright and glorious future of D. ARC most efficiently solves all memory management problems ever encountered. Peer-Reviewed Research and the Scientific Method be damned! ALL HAIL ARC!

Sadly, although written as hyperbole, I feel that the above is fairly close to the actual position of the ARC crowd.

-- 
Adam Wilson
GitHub/IRC: LightBender
Aurora Project Coordinator
February 03, 2014
On Mon, 03 Feb 2014 12:21:14 -0800, Adam Wilson <flyboynw@gmail.com> wrote:

> On Mon, 03 Feb 2014 12:02:29 -0800, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
>
>> On 2/3/14, 6:57 AM, Frank Bauer wrote:
>>> Anyone asking for the addition of ARC or owning pointers to D, gets
>>> pretty much ignored. The topic is "Smart pointers instead of GC?",
>>> remember? People here seem to be more interested in diverting to
>>> nullable, scope and GC optimization. Telling, indeed.
>>
>> I thought I made it clear that GC avoidance (which includes considering built-in reference counting) is a major focus of 2014.
>>
>> Andrei
>>
>
> Andrei, I am sorry to report that anything other than complete removal of the GC and replacement with compiler generated ARC will be unacceptable to a certain, highly vocal, subset of D users. No arguments can be made to otherwise, regardless of validity. As far as they are concerned the discussion of ARC vs. GC is closed and decided. ARC is the only path forward to the bright and glorious future of D. ARC most efficiently solves all memory management problems ever encountered. Peer-Reviewed Research and the Scientific Method be damned! ALL HAIL ARC!
>
> Sadly, although written as hyperbole, I feel that the above is fairly close to the actual position of the ARC crowd.
>

That said, I do think that it should be possible to implement the two side-by-side, although it might require some new keywords.

-- 
Adam Wilson
GitHub/IRC: LightBender
Aurora Project Coordinator