www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - std.string.format

reply =?ISO-8859-1?Q?Alex_R=F8nne_Petersen?= <alex lycus.org> writes:
https://github.com/D-Programming-Language/phobos/pull/231

What are the plans for this? I really think the current format() 
implementation needs to go; the use of varargs makes it very annoying to 
work with since, for example, enum types decay to integral types.

I could start using xformat(), but if that's going to be deprecated at 
some point, too, well...

-- 
Alex Rønne Petersen
alex lycus.org
http://lycus.org
Jun 23 2012
next sibling parent reply "Bernard Helyer" <b.helyer gmail.com> writes:
On Saturday, 23 June 2012 at 18:06:32 UTC, Alex Rønne Petersen 
wrote:
 I could start using xformat(), but if that's going to be 
 deprecated at some point, too, well...
...you'd have to do a two second search and replace.
Jun 24 2012
parent reply =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= <alex lycus.org> writes:
On 24-06-2012 09:10, Bernard Helyer wrote:
 On Saturday, 23 June 2012 at 18:06:32 UTC, Alex Rønne Petersen wrote:
 I could start using xformat(), but if that's going to be deprecated at
 some point, too, well...
....you'd have to do a two second search and replace.
...and introduce a dependency on a newer Phobos. -- Alex Rønne Petersen alex lycus.org http://lycus.org
Jun 24 2012
next sibling parent "Bernard Helyer" <b.helyer gmail.com> writes:
On Sunday, 24 June 2012 at 07:56:04 UTC, Alex Rønne Petersen 
wrote:
 On 24-06-2012 09:10, Bernard Helyer wrote:
 On Saturday, 23 June 2012 at 18:06:32 UTC, Alex Rønne 
 Petersen wrote:
 I could start using xformat(), but if that's going to be 
 deprecated at
 some point, too, well...
....you'd have to do a two second search and replace.
...and introduce a dependency on a newer Phobos.
If you're using D and are supporting old builds you're braver than I. Personally I only care about RELEASE and RELEASE-1.
Jun 24 2012
prev sibling parent reply "Bernard Helyer" <b.helyer gmail.com> writes:
On Sunday, 24 June 2012 at 07:56:04 UTC, Alex Rønne Petersen 
wrote:
 On 24-06-2012 09:10, Bernard Helyer wrote:
 On Saturday, 23 June 2012 at 18:06:32 UTC, Alex Rønne 
 Petersen wrote:
 I could start using xformat(), but if that's going to be 
 deprecated at
 some point, too, well...
....you'd have to do a two second search and replace.
...and introduce a dependency on a newer Phobos.
Wwwwait a minute. You have exactly the same problem if format is changed.
Jun 24 2012
parent reply "David Nadlinger" <see klickverbot.at> writes:
On Sunday, 24 June 2012 at 15:02:08 UTC, Bernard Helyer wrote:
 Wwwwait a minute. You have exactly the same problem if format 
 is changed.
No, because it is source compatible in the vast majority of cases. See the discussion linked above. David
Jun 24 2012
parent "Bernard Helyer" <b.helyer gmail.com> writes:
On Sunday, 24 June 2012 at 16:14:29 UTC, David Nadlinger wrote:
 On Sunday, 24 June 2012 at 15:02:08 UTC, Bernard Helyer wrote:
 Wwwwait a minute. You have exactly the same problem if format 
 is changed.
No, because it is source compatible in the vast majority of cases.
Famous last words David. :P
Jun 24 2012
prev sibling parent kenji hara <k.hara.pg gmail.com> writes:
It's now scheduled for replacement.
https://github.com/D-Programming-Language/phobos/commit/3485ac4fba2428f8e99=
abe1a00d7f693a45e1029

Kenji Hara

2012/6/24 Alex R=C3=B8nne Petersen <alex lycus.org>:
 https://github.com/D-Programming-Language/phobos/pull/231

 What are the plans for this? I really think the current format()
 implementation needs to go; the use of varargs makes it very annoying to
 work with since, for example, enum types decay to integral types.

 I could start using xformat(), but if that's going to be deprecated at so=
me
 point, too, well...

 --
 Alex R=C3=B8nne Petersen
 alex lycus.org
 http://lycus.org
Jul 01 2012