Re: How to turn an inout(Object) into a string

2015-04-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 26, 2015 05:09:30 Meta via Digitalmars-d-learn wrote: > On Sunday, 26 April 2015 at 04:52:36 UTC, Jonathan M Davis wrote: > > It's only undefined if mutation is involved, though I don't > > know if mutation is involved in this case or not > > I was thinking that a class can define

Re: How to turn an inout(Object) into a string

2015-04-25 Thread Meta via Digitalmars-d-learn
On Sunday, 26 April 2015 at 04:52:36 UTC, Jonathan M Davis wrote: It's only undefined if mutation is involved, though I don't know if mutation is involved in this case or not I was thinking that a class can define an arbitrary toString() that modifies it some of its member variables, which def

Re: How to turn an inout(Object) into a string

2015-04-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, April 26, 2015 03:51:25 Meta via Digitalmars-d-learn wrote: > On Sunday, 26 April 2015 at 03:48:00 UTC, tcak wrote: > > On Sunday, 26 April 2015 at 03:09:17 UTC, Meta wrote: > >> The following code spits out pages of error messages, and it's > >> driving me insane. I know that Object.toS

Re: How to turn an inout(Object) into a string

2015-04-25 Thread Meta via Digitalmars-d-learn
On Sunday, 26 April 2015 at 03:48:00 UTC, tcak wrote: On Sunday, 26 April 2015 at 03:09:17 UTC, Meta wrote: The following code spits out pages of error messages, and it's driving me insane. I know that Object.toString only has a mutable variant, so how am I supposed to use writeln, toString, e

Re: How to turn an inout(Object) into a string

2015-04-25 Thread tcak via Digitalmars-d-learn
On Sunday, 26 April 2015 at 03:09:17 UTC, Meta wrote: The following code spits out pages of error messages, and it's driving me insane. I know that Object.toString only has a mutable variant, so how am I supposed to use writeln, toString, etc. with an inout, const, or immutable object? void m

How to turn an inout(Object) into a string

2015-04-25 Thread Meta via Digitalmars-d-learn
The following code spits out pages of error messages, and it's driving me insane. I know that Object.toString only has a mutable variant, so how am I supposed to use writeln, toString, etc. with an inout, const, or immutable object? void main(inout string[] args) { import std.stdio;