Thanks thedeemon.
On Friday, 10 October 2014 at 04:42:04 UTC, thedeemon wrote:
On Friday, 10 October 2014 at 03:06:33 UTC, Joel wrote:
How do you use that toString? Maybe an example?
void main() {
Try t = Try("Joel", 35);
t.toString(s => writeln(s));
}
On Friday, 10 October 2014 at 11:35:21 UTC, Hjkp wrote:
On Friday, 10 October 2014 at 04:42:04 UTC, thedeemon wrote:
On Friday, 10 October 2014 at 03:06:33 UTC, Joel wrote:
How do you use that toString? Maybe an example?
void main() {
Try t = Try("Joel", 35);
t.toString(s =>
On 10/10/14 11:20 AM, Ali Çehreli wrote:
On 10/10/2014 06:30 AM, Steven Schveighoffer wrote:
> The const outside is irrelevant to whether it will accept it or not,
> that is a contract between the toString function and your object. If you
> want a non-const toString, I think that should work.
On 10/10/2014 06:30 AM, Steven Schveighoffer wrote:
> On 10/10/14 1:00 AM, Ali Çehreli wrote:
>> On 10/09/2014 08:06 PM, Joel wrote:
>>> On Tuesday, 30 September 2014 at 17:27:09 UTC, Adam D. Ruppe wrote:
>>>> On Tuesday, 30 September 2014 at 17:22:44 UTC, Gary Wil
On 10/10/14 1:00 AM, Ali Çehreli wrote:
On 10/09/2014 08:06 PM, Joel wrote:
On Tuesday, 30 September 2014 at 17:27:09 UTC, Adam D. Ruppe wrote:
On Tuesday, 30 September 2014 at 17:22:44 UTC, Gary Willoughby wrote:
What is a sink delegate?
Instead of
string toString() { return "foo&quo
On Friday, 10 October 2014 at 04:42:04 UTC, thedeemon wrote:
On Friday, 10 October 2014 at 03:06:33 UTC, Joel wrote:
How do you use that toString? Maybe an example?
void main() {
Try t = Try("Joel", 35);
t.toString(s => writeln(s));
}
I think that the problem pointed by the
On 10/09/2014 08:06 PM, Joel wrote:
On Tuesday, 30 September 2014 at 17:27:09 UTC, Adam D. Ruppe wrote:
On Tuesday, 30 September 2014 at 17:22:44 UTC, Gary Willoughby wrote:
What is a sink delegate?
Instead of
string toString() { return "foo"; }
for example, you would use:
voi
On Friday, 10 October 2014 at 03:06:33 UTC, Joel wrote:
How do you use that toString? Maybe an example?
void main() {
Try t = Try("Joel", 35);
t.toString(s => writeln(s));
}
On Tuesday, 30 September 2014 at 17:27:09 UTC, Adam D. Ruppe
wrote:
On Tuesday, 30 September 2014 at 17:22:44 UTC, Gary Willoughby
wrote:
What is a sink delegate?
Instead of
string toString() { return "foo"; }
for example, you would use:
void toString(void delegate(string) si
On 9/30/14 1:22 PM, Gary Willoughby wrote:
What is a sink delegate?
Discussed here:
http://forum.dlang.org/thread/m0bdgg$1t7j$1...@digitalmars.com?page=6#post-m0emvc:242av5:241:40digitalmars.com
Aside from Adam's answer, the term 'sink' means to draw out something,
as in
On Tuesday, 30 September 2014 at 17:22:44 UTC, Gary Willoughby
wrote:
What is a sink delegate?
Instead of
string toString() { return "foo"; }
for example, you would use:
void toString(void delegate(string) sink) { sink("foo"); }
The sink argument there is then free to
What is a sink delegate?
Discussed here:
http://forum.dlang.org/thread/m0bdgg$1t7j$1...@digitalmars.com?page=6#post-m0emvc:242av5:241:40digitalmars.com
12 matches
Mail list logo