www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Re: C++ istream / ostream equivalent ?

I'm currently looking at ways to improve std.conv.to. And this might be a good
area to improve std.conv.parse.

For example parse could be made to look for a method static readFrom!(T)()
if(isSomeString!T) and maybe to should take advantage of it.

auto foo = to!A(someString);

I'd have to require the entire string be used to convert, while parse would not
(consistent with other differences). So you'd likely use parse:

try while(true) {
    a[i++] = parse!A(someString);
} catch ...

Dec 02 2010