On 07/12/2010 17:31, Steven Schveighoffer wrote:
On Tue, 07 Dec 2010 11:44:56 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 02/12/2010 21:08, Steven Schveighoffer wrote:
On Thu, 02 Dec 2010 11:31:49 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 21/11/2010
On 02/12/2010 21:08, Steven Schveighoffer wrote:
On Thu, 02 Dec 2010 11:31:49 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 21/11/2010 17:21, Don wrote:
That idea is quite idiotic indeed, no question about it. However, that
is not toString() 's idea! The point of toString (at
On Tue, 07 Dec 2010 11:44:56 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 02/12/2010 21:08, Steven Schveighoffer wrote:
On Thu, 02 Dec 2010 11:31:49 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 21/11/2010 17:21, Don wrote:
That idea is quite idiotic
On 21/11/2010 17:21, Don wrote:
spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't
do obj.toString(). Instead you'd do to!string(obj).
I'm usually not using toString(), it's
On Thu, 02 Dec 2010 11:31:49 -0500, Bruno Medeiros
brunodomedeiros+s...@com.gmail wrote:
On 21/11/2010 17:21, Don wrote:
spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't
do
Tomek Sowiński wrote:
Don nos...@nospam.com napisał(a):
The efficiency issues are important, but are not the primary motivation.
toString() is just wrong. The idea that there is ONE AND ONLY ONE
textual representation of an object, is, frankly, idiotic.
I always thought of toString() as an
On Mon, 22 Nov 2010 10:14:03 +0100
Don nos...@nospam.com wrote:
Tomek Sowiński wrote:
Don nos...@nospam.com napisał(a):
The efficiency issues are important, but are not the primary motivation.
toString() is just wrong. The idea that there is ONE AND ONLY ONE
textual representation of
spir wrote:
On Mon, 22 Nov 2010 10:14:03 +0100
Don nos...@nospam.com wrote:
Tomek Sowiński wrote:
Don nos...@nospam.com napisał(a):
The efficiency issues are important, but are not the primary motivation.
toString() is just wrong. The idea that there is ONE AND ONLY ONE
textual
toString lacks flexibility in some (not very common but relevant) cases.
That pretty much says that you don't do much of math coding/debugging.
It is very common on the other side of the world.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Sun, 21 Nov 2010 05:10:13 -0500, spir denis.s...@gmail.com wrote:
On Thu, 18 Nov 2010 17:21:20 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString problem
I
brought up several posts ago.
See:
On Mon, 22 Nov 2010 11:02:48 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
On Sun, 21 Nov 2010 05:10:13 -0500, spir denis.s...@gmail.com wrote:
On Thu, 18 Nov 2010 17:21:20 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to
spir schrieb:
toString is so wrong that it's often the first method most users of most
OO language implement -- to ensure vivious bugs won't pass unseen -- to
be able to combine representations into more complete representations--
to construct useful feedback about their app in general.
When
On Thu, 18 Nov 2010 17:21:20 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString problem I
brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
Hello,
[Sorry for a partly
On Sunday 21 November 2010 02:10:13 spir wrote:
On Thu, 18 Nov 2010 17:21:20 -0500
Steven Schveighoffer schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString problem I
brought up several posts ago.
See:
On 11/21/2010 11:10 AM, spir wrote:
What I do not want is tostring be deprecated in any case. The proposal would be
OK if it introduced an _alternative_ for the cases (?) where string output
efficiency is relevant. The language could/should default to writeTo is
toString is not defined, *and*
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't do
obj.toString(). Instead you'd do to!string(obj).
I'm usually not using toString(), it's supported by the language. What about
format(%s:%s,
On Sun, 21 Nov 2010 15:55:10 +0100
Pelle Månsson pelle.mans...@gmail.com wrote:
But the key point is that language features like D's toString are far to be
used only for _direct_ string output. They are extremely useful for
numerous tasks of string manipulation and processing, most of
On 21.11.2010 17:08, spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davisjmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't do
obj.toString(). Instead you'd do to!string(obj).
I'm usually not using toString(), it's supported by the
On 2010-11-21 05:10:13 -0500, spir denis.s...@gmail.com said:
I consider time space efficiency for string output to be irrelevant, not
even a theoretic question. Maybe I simply have never reached points where i
t would? Have you ever stepped on a app not running correctly because toStr
ing
spir denis.s...@gmail.com wrote in message
news:mailman.532.1290349037.21107.digitalmar...@puremagic.com...
On Sun, 21 Nov 2010 15:55:10 +0100
Pelle Månsson pelle.mans...@gmail.com wrote:
But the key point is that language features like D's toString are far
to be used only for _direct_
On 11/21/2010 03:17 PM, spir wrote:
No, just use toString. As said above, I don't want to writeTo, I want the
string; and be free to do whatever I want to with it. Being only able to write
is... (rather censure).
I... don't think you understand what writeTo is supposed to do.
Inside
Don:
The efficiency issues are important, but are not the primary motivation.
toString() is just wrong. The idea that there is ONE AND ONLY ONE
textual representation of an object, is, frankly, idiotic.
To solve that the toString() may take an argument, like a formatting string or
an enum,
On Sun, 21 Nov 2010 18:21:48 +0100
Don nos...@nospam.com wrote:
spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't do
obj.toString(). Instead you'd do to!string(obj).
On 2010-11-21 17:28, Pelle Månsson wrote:
On 11/21/2010 03:17 PM, spir wrote:
No, just use toString. As said above, I don't want to writeTo, I want
the string; and be free to do whatever I want to with it. Being only
able to write is... (rather censure).
I... don't think you understand what
On Sun, 21 Nov 2010 17:28:09 +0100
Pelle Månsson pelle.mans...@gmail.com wrote:
However, writeln can do this:
foreach (arg; args) {
arg.writeTo((const(char)[] data) { outputbuffer.put(data); })
}
thereby removing the need to store the string, and the extra allocations.
On 11/21/2010 09:49 PM, spir wrote:
(Sorry for the irony.) Make simple things easy. Have to write a delegate to
get feedback... to print a bit of text.
(What is hello, world! in D?)
Missing the point, are we? Hello world is unchanged.
On Nov 22, 10 04:49, spir wrote:
On Sun, 21 Nov 2010 17:28:09 +0100
Pelle Månssonpelle.mans...@gmail.com wrote:
However, writeln can do this:
foreach (arg; args) {
arg.writeTo((const(char)[] data) { outputbuffer.put(data); })
}
thereby removing the need to store the
On 11/21/2010 09:37 PM, Jacob Carlborg wrote:
Inside to!string, it would be something like this:
string s;
arg.writeTo((const(char)[] data) { s ~= data; });
return s;
Why can't toString do the same ?
Because then you'd have to write it? I'm afraid I don't understand.
spir wrote:
On Sun, 21 Nov 2010 17:28:09 +0100
Pelle Månsson pelle.mans...@gmail.com wrote:
However, writeln can do this:
foreach (arg; args) {
arg.writeTo((const(char)[] data) { outputbuffer.put(data); })
}
thereby removing the need to store the string, and the extra
spir wrote:
On Sun, 21 Nov 2010 18:21:48 +0100
Don nos...@nospam.com wrote:
spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't do
obj.toString(). Instead you'd do
spir:
1. Please bring concrete cases of apps that do not work well because of
toString and would work fine just by replacing it with writeTo.
writeln is already slow. To print quickly numerical genomic data in D I have
had to use printf in some situations.
4. If you want another default
Don nos...@nospam.com napisał(a):
The efficiency issues are important, but are not the primary motivation.
toString() is just wrong. The idea that there is ONE AND ONLY ONE
textual representation of an object, is, frankly, idiotic.
I always thought of toString() as an aid in debugging,
spir wrote:
On Sun, 21 Nov 2010 18:21:48 +0100
Don nos...@nospam.com wrote:
spir wrote:
On Sun, 21 Nov 2010 03:17:57 -0800
Jonathan M Davis jmdavisp...@gmx.com wrote:
You're not losing _anything_ out of the deal except that you wouldn't do
obj.toString(). Instead you'd do to!string(obj).
On 2010-11-18 23:21, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
-Steve
Why do we have to remove toString, can't toString call writeTo and
On Fri, 19 Nov 2010 10:22:29 +0100, Jacob Carlborg wrote:
On 2010-11-18 23:21, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
-Steve
Why
On 19-nov-10, at 10:22, Jacob Carlborg wrote:
On 2010-11-18 23:21, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString
problem
I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
-Steve
Why do we have
On 19-nov-10, at 11:13, Lars T. Kyllingstad wrote:
On Fri, 19 Nov 2010 10:22:29 +0100, Jacob Carlborg wrote:
On 2010-11-18 23:21, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString
problem
I brought up several posts ago.
See:
On Thu, 18 Nov 2010 20:18:19 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Thursday, November 18, 2010 14:21:20 Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem
I
brought up several posts ago.
See:
On Fri, 19 Nov 2010 02:27:07 -0500, Lars T. Kyllingstad
pub...@kyllingen.nospamnet wrote:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
I've made suggested changes,
Steven Schveighoffer:
I've made suggested changes, please review again.
Good, thank you.
Just a note: a DIP is a public document so it's better to encourage good idioms
inside it. null to represent empty arrays/strings is a bad practice, so
instead of this:
void writeTo(scope delegate(in
On Fri, 19 Nov 2010 09:14:07 -0500, bearophile bearophileh...@lycos.com
wrote:
Steven Schveighoffer:
I've made suggested changes, please review again.
Good, thank you.
Just a note: a DIP is a public document so it's better to encourage good
idioms inside it. null to represent empty
Steven Schveighoffer:
Who said setting an array to null is bad practice? I disagree. null is a
better way to represent it, because it sets both the ptr and the length to
0, while only sets the length to 0.
char[] arr = ;
assert(arr == null); // passes
assert(arr is null); //
On Friday, November 19, 2010 05:54:15 Steven Schveighoffer wrote:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See:
Steven Schveighoffer Wrote:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the toString
problem I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
On Fri, 19 Nov 2010 12:51:29 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Friday, November 19, 2010 05:54:15 Steven Schveighoffer wrote:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer
schvei...@yahoo.com wrote:
I just created a new D Improvement Proposal to fix the
On Friday, November 19, 2010 10:26:40 Steven Schveighoffer wrote:
On Fri, 19 Nov 2010 12:51:29 -0500, Jonathan M Davis jmdavisp...@gmx.com
wrote:
On Friday, November 19, 2010 05:54:15 Steven Schveighoffer wrote:
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer
I just created a new D Improvement Proposal to fix the toString problem I
brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
-Steve
Steven Schveighoffer:
I just created a new D Improvement Proposal to fix the toString problem I
brought up several posts ago.
Thank you for writing the DIP. It looks interesting. I suggest to add an
example, the implementation of toString() and writeTo() for a simple struct
like this (or a
On Thursday, November 18, 2010 14:21:20 Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem I
brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
Looks good overall, but I would point out that the text
On Thu, 18 Nov 2010 17:21:20 -0500, Steven Schveighoffer wrote:
I just created a new D Improvement Proposal to fix the toString problem
I brought up several posts ago.
See: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP9
I think it's best to leave out the '%' from the format
51 matches
Mail list logo