On Monday, 7 December 2015 at 07:10:42 UTC, Sönke Ludwig wrote:
I've very likely missed that part of the discussion - what were
the reasons to not use "scope" for this?
Yeah good point, it should be possible to reuse scope as method
attribute. I just used @noescape as a placeholder for the
Am 01.11.2015 um 21:47 schrieb Martin Nowak:
On 10/27/2015 12:41 PM, Andrei Alexandrescu wrote:
- I'm not a fan of adding yet another attribute but as inference support
is currently limited it seems we'd need an explicit attribute for
public APIs.
I've very likely missed that part of the
On Saturday, 5 December 2015 at 22:06:33 UTC, sclytrack wrote:
On Monday, 2 November 2015 at 09:56:14 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 1 November 2015 at 22:04:51 UTC, deadalnix wrote:
On Sunday, 1 November 2015 at 20:55:00 UTC, Martin Nowak
wrote:
On 11/01/2015 09:51 PM, Martin
On Monday, 2 November 2015 at 09:56:14 UTC, Ola Fosheim Grøstad
wrote:
On Sunday, 1 November 2015 at 22:04:51 UTC, deadalnix wrote:
On Sunday, 1 November 2015 at 20:55:00 UTC, Martin Nowak wrote:
On 11/01/2015 09:51 PM, Martin Nowak wrote:
On Sunday, 1 November 2015 at 22:04:51 UTC, deadalnix wrote:
On Sunday, 1 November 2015 at 20:55:00 UTC, Martin Nowak wrote:
On 11/01/2015 09:51 PM, Martin Nowak wrote:
Any hint/numbers showing that this is actually useful?
Also doesn't a good backend optimizer already fuse writes?
Yes but
On Sunday, 1 November 2015 at 20:55:00 UTC, Martin Nowak wrote:
On 11/01/2015 09:51 PM, Martin Nowak wrote:
Any hint/numbers showing that this is actually useful?
Also doesn't a good backend optimizer already fuse writes?
Yes but you have this myth flying around that it is necessary for
On Sunday, 1 November 2015 at 22:36:46 UTC, Andrei Alexandrescu
wrote:
On 11/01/2015 03:51 PM, Martin Nowak wrote:
On 10/27/2015 01:27 PM, Andrei Alexandrescu wrote:
Unrelated, and a foreshadowing of the discussion on the
lifetime mailing
list: the compiler has ample opportunity to fuse
On Sunday, 1 November 2015 at 20:55:00 UTC, Martin Nowak wrote:
On 11/01/2015 09:51 PM, Martin Nowak wrote:
Any hint/numbers showing that this is actually useful?
Also doesn't a good backend optimizer already fuse writes?
AFAIK the fear of RC being too slow comes from C++'s shared_ptr's
On 11/1/15 5:52 PM, rsw0x wrote:
On Sunday, 1 November 2015 at 22:36:46 UTC, Andrei Alexandrescu wrote:
On 11/01/2015 03:51 PM, Martin Nowak wrote:
On 10/27/2015 01:27 PM, Andrei Alexandrescu wrote:
Unrelated, and a foreshadowing of the discussion on the lifetime
mailing
list: the compiler
On 10/27/2015 12:41 PM, Andrei Alexandrescu wrote:
> It follows that if we want safe reference counting, there must be
> language support for it. One possibility is to attach an attribute to
> the class definition:
>
> @safe @rc class Widget {
> ...
> }
Let's think about this more clearly
On 10/27/2015 01:27 PM, Andrei Alexandrescu wrote:
> Unrelated, and a foreshadowing of the discussion on the lifetime mailing
> list: the compiler has ample opportunity to fuse incs/decs together, so
> the signatures of these functions is:
>
> void opInc(uint delta);
> void opDec(uint delta);
On 11/01/2015 09:51 PM, Martin Nowak wrote:
> Any hint/numbers showing that this is actually useful?
Also doesn't a good backend optimizer already fuse writes?
On 11/01/2015 03:54 PM, Martin Nowak wrote:
On 11/01/2015 09:51 PM, Martin Nowak wrote:
Any hint/numbers showing that this is actually useful?
Also doesn't a good backend optimizer already fuse writes?
My understanding is that no, that won't happen in most patterns that
matter. -- Andrei
On 11/01/2015 03:51 PM, Martin Nowak wrote:
On 10/27/2015 01:27 PM, Andrei Alexandrescu wrote:
Unrelated, and a foreshadowing of the discussion on the lifetime mailing
list: the compiler has ample opportunity to fuse incs/decs together, so
the signatures of these functions is:
void opInc(uint
On Thursday, 29 October 2015 at 20:31:49 UTC, Zach the Mystic
wrote:
On Tuesday, 27 October 2015 at 18:10:18 UTC, deadalnix wrote:
I've made the claim that we should implement reference
counting as a library many time, so I think I should explicit
my position. Indeed, RC require some level a
On Tuesday, 27 October 2015 at 18:10:18 UTC, deadalnix wrote:
I've made the claim that we should implement reference counting
as a library many time, so I think I should explicit my
position. Indeed, RC require some level a compiler support to
be safe. That being said, the support does not
On Wednesday, 28 October 2015 at 11:21:17 UTC, Manu wrote:
RC is okay-ish in C++11 (with rval references), although it
could be
much better, for instance, the type mangling/wrapping induced
by this
sort of library solution always leads to awkward situations, ie,
'this' pointer in a method is
On 28 October 2015 at 11:13, Walter Bright via Digitalmars-d
wrote:
> On 10/27/2015 11:10 AM, deadalnix wrote:
>>
>> I've made the claim that we should implement reference counting as a
>> library
>> many time, so I think I should explicit my position. Indeed, RC
On 28 October 2015 at 21:29, David Nadlinger via Digitalmars-d
wrote:
> On Wednesday, 28 October 2015 at 11:21:17 UTC, Manu wrote:
>>
>> RC is okay-ish in C++11 (with rval references), although it could be
>> much better, for instance, the type mangling/wrapping
On 10/28/2015 04:13 AM, Jacob Carlborg wrote:
On 2015-10-27 22:19, Andrei Alexandrescu wrote:
That doesn't seem to be the case at all. -- Andrei
I'm not a C++ or Rust expert. But I think that in Rust and with the new
C++ guide lines the idea is to use reference counting pointers only for
On Wednesday, 28 October 2015 at 03:55:25 UTC, deadalnix wrote:
On Wednesday, 28 October 2015 at 01:13:16 UTC, Walter Bright
wrote:
It's not just safety. If the compiler knows that reference
counting is going on, it can potentially elide a lot of the
overhead. If it is faced with an
On 2015-10-27 22:50, Andrei Alexandrescu wrote:
You can safely ignore the C++ part, the views are unsafe. I'd appreciate
if you backed up your claim on Rust. -- Andrei
Rust is unsafe as well, when you interface with unsafe code.
--
/Jacob Carlborg
On 2015-10-28 07:07, Paulo Pinto wrote:
However their exceptions work in a more RC friendly way.
Swift doesn't support exceptions. And in Objective-C exceptions are like
Errors in D. They should not be caught and the program should terminate.
The error handling support that was added in
On 2015-10-27 22:19, Andrei Alexandrescu wrote:
That doesn't seem to be the case at all. -- Andrei
I'm not a C++ or Rust expert. But I think that in Rust and with the new
C++ guide lines the idea is to use reference counting pointers only for
owning resources. If you want to pass the data
On 10/28/2015 7:58 AM, Andrei Alexandrescu wrote:
On 10/28/2015 04:13 AM, Jacob Carlborg wrote:
On 2015-10-27 22:19, Andrei Alexandrescu wrote:
That doesn't seem to be the case at all. -- Andrei
I'm not a C++ or Rust expert. But I think that in Rust and with the new
C++ guide lines the idea
On 2015-10-28 09:50, Paulo Pinto wrote:
Hence why I mentioned they are more RC friendly.
Swift, because it doesn't have them.
Objective-C, because termination is the only option so no need to worry
about preserving counters.
I was typing on the phone, so didn't want to provide the full
On Wednesday, 28 October 2015 at 08:07:40 UTC, Jacob Carlborg
wrote:
On 2015-10-28 07:07, Paulo Pinto wrote:
However their exceptions work in a more RC friendly way.
Swift doesn't support exceptions. And in Objective-C exceptions
are like Errors in D. They should not be caught and the
On Wednesday, 28 October 2015 at 06:07:12 UTC, Paulo Pinto wrote:
Objective-C does elide refcounting, there are a few WWDC ARC
sessions where it is mentioned. Same applies to Swift.
Indeed, John McCall from Apple has already described how ARC
works in these forums (astonishingly nobody felt
On 28/10/15 12:41 AM, Andrei Alexandrescu wrote:
(Title is borrowed from Hans Boehm's famous "Threads cannot be
implemented as a library",
http://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf.)
We want to implement safe reference counting in D, and the sentiment
that it can be done in a
On 10/27/2015 07:57 AM, Manu via Digitalmars-d wrote:
On 27 October 2015 at 21:41, Andrei Alexandrescu via Digitalmars-d
wrote:
It follows that if we want safe reference counting, there must be language
support for it. One possibility is to attach an attribute to
On 27 October 2015 at 21:41, Andrei Alexandrescu via Digitalmars-d
wrote:
>
> It follows that if we want safe reference counting, there must be language
> support for it. One possibility is to attach an attribute to the class
> definition:
>
> @safe @rc class Widget {
(Title is borrowed from Hans Boehm's famous "Threads cannot be
implemented as a library",
http://www.hpl.hp.com/techreports/2004/HPL-2004-209.pdf.)
We want to implement safe reference counting in D, and the sentiment
that it can be done in a library (with no or minimal changes to the
On 27 October 2015 at 22:27, Andrei Alexandrescu via Digitalmars-d
wrote:
> On 10/27/2015 07:57 AM, Manu via Digitalmars-d wrote:
>>
>> On 27 October 2015 at 21:41, Andrei Alexandrescu via Digitalmars-d
>> wrote:
>>>
>>>
>>> It follows
On 10/27/15 11:59 AM, Jonathan M Davis wrote:
On Tuesday, 27 October 2015 at 12:27:29 UTC, Andrei Alexandrescu wrote:
Unrelated, and a foreshadowing of the discussion on the lifetime
mailing list:
What's the lifetime mailing list?
To be created. -- Andrei
On Tuesday, 27 October 2015 at 12:27:29 UTC, Andrei Alexandrescu
wrote:
Unrelated, and a foreshadowing of the discussion on the
lifetime mailing list:
What's the lifetime mailing list?
- Jonathan M Davis
I've made the claim that we should implement reference counting
as a library many time, so I think I should explicit my position.
Indeed, RC require some level a compiler support to be safe. That
being said, the support does not need to be specific to RC. On
fact, my position is that the
On Tuesday, 27 October 2015 at 18:10:18 UTC, deadalnix wrote:
The problem at hand here is escape analysis. The compiler must
be able to ensure that a reference doesn't escape the RC
mechanism in an uncontrolled manner. I'd like to add such
mechanism to the language rather than bake in
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to solve this problem...because it isn't
really a problem in practice.
In c++/rust code you use value/unique types 99.9% of the time,
and reference counting is only for
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to solve this problem...because it isn't
really a problem in practice.
In c++/rust code you use value/unique types 99.9% of the time,
and reference counting is only for
Why care about this?
Even Rust doesn't try to solve this problem...because it isn't
really a problem in practice.
In c++/rust code you use value/unique types 99.9% of the time,
and reference counting is only for shared/aliased objects.
Reference counting == rare and unimportant
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to solve this problem...because it isn't
really a problem in practice.
In c++/rust code you use value/unique types 99.9% of the time,
and reference counting is only for
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis
wrote:
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to solve this problem...because it
isn't really a problem in practice.
In c++/rust code you use value/unique
On 10/27/2015 05:26 PM, rsw0x wrote:
It has been a great success for Rust, I rarely ever see RC used anywhere
in Rust code thanks to borrowing. The new C++ core guidelines are also
heavily based on this cf. *_view types in GSL.
You can safely ignore the C++ part, the views are unsafe. I'd
On Tuesday, 27 October 2015 at 20:45:34 UTC, rsw0x wrote:
if they're using shared_ptr all over the place, they're doing
it wrong.
shared_ptr is supposed to be a last resort
According to Herb Sutter, it is a zero cost abstraction, not like
these pesky GC that makes your program slow.
Really? I've seen tons of C++ code that's written using smart
pointers with objects living on the heap which then get passed
around all over the place.
Yes there is lots of old C++ code that does this, largely
because unique_ptr wasn't implementable until C++11 added R value
refs and move
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis
wrote:
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
[...]
Really? I've seen tons of C++ code that's written using smart
pointers with objects living on the heap which then get passed
around all over the place.
On 10/27/2015 04:19 PM, PuglyWUgly wrote:
Reference counting == rare and unimportant
That doesn't seem to be the case at all. -- Andrei
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu
wrote:
On 10/27/2015 05:26 PM, rsw0x wrote:
It has been a great success for Rust, I rarely ever see RC
used anywhere
in Rust code thanks to borrowing. The new C++ core guidelines
are also
heavily based on this cf. *_view types
You can safely ignore the C++ part, the views are unsafe. I'd
appreciate if you backed up your claim on Rust. -- Andrei
I did a rough check of the Rust compiler source(from a copy I
downloaded a couple months ago).
I think the compiler is supposedly filled with old code, not sure
if it is
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu
wrote:
On 10/27/2015 05:26 PM, rsw0x wrote:
It has been a great success for Rust, I rarely ever see RC
used anywhere
in Rust code thanks to borrowing. The new C++ core guidelines
are also
heavily based on this cf. *_view types
On Tuesday, 27 October 2015 at 21:20:58 UTC, Andrei Alexandrescu
wrote:
On 10/27/2015 04:45 PM, rsw0x wrote:
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis
wrote:
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to
Well perhaps D prefers the Swift route, with everyone ref
counted & some compiler help.
Nothing wrong with that I guess, I haven't been paying attention
to what D is planning exactly.
On 10/27/2015 04:45 PM, rsw0x wrote:
On Tuesday, 27 October 2015 at 20:41:49 UTC, Jonathan M Davis wrote:
On Tuesday, 27 October 2015 at 20:19:42 UTC, PuglyWUgly wrote:
Why care about this?
Even Rust doesn't try to solve this problem...because it isn't
really a problem in practice.
In
On Tuesday, 27 October 2015 at 21:50:15 UTC, Andrei Alexandrescu
wrote:
On 10/27/2015 05:26 PM, rsw0x wrote:
It has been a great success for Rust, I rarely ever see RC
used anywhere
in Rust code thanks to borrowing. The new C++ core guidelines
are also
heavily based on this cf. *_view types
On 10/27/2015 11:10 AM, deadalnix wrote:
I've made the claim that we should implement reference counting as a library
many time, so I think I should explicit my position. Indeed, RC require some
level a compiler support to be safe. That being said, the support does not need
to be specific to RC.
On 10/27/2015 9:03 AM, Andrei Alexandrescu wrote:
On 10/27/15 11:59 AM, Jonathan M Davis wrote:
What's the lifetime mailing list?
To be created. -- Andrei
And you'll be in it for life, so be sure you want to join :-)
On Wednesday, 28 October 2015 at 01:13:16 UTC, Walter Bright
wrote:
It's not just safety. If the compiler knows that reference
counting is going on, it can potentially elide a lot of the
overhead. If it is faced with an arbitrary library solution, it
only has a worm's eye view of it, and
On Wednesday, 28 October 2015 at 03:55:25 UTC, deadalnix wrote:
If I had to go about this, I'd rather see the introduction a
scope(exit/success/failure) like mechanism for destructors
rather than something ref counting specific.
can you expand upon this?
On Tuesday, 27 October 2015 at 11:41:52 UTC, Andrei Alexandrescu
wrote:
The crux of the matter is modular typechecking. Consider the
following example:
// module widget.d
@safe class Widget {
void fun() {
g_widget = this;
}
}
static Widget g_widget;
// end of module widget.d
Now, once
On Wednesday, 28 October 2015 at 02:08:18 UTC, Sebastiaan Koppe
wrote:
On Tuesday, 27 October 2015 at 11:41:52 UTC, Andrei
Alexandrescu wrote:
The crux of the matter is modular typechecking. Consider the
following example:
// module widget.d
@safe class Widget {
void fun() {
g_widget =
60 matches
Mail list logo