December 05, 2008
Reply to Jarrett,

> On Thu, Dec 4, 2008 at 9:25 PM, Bill Baxter <wbaxter@gmail.com> wrote:
> 
>> It's scope!  No worries mate! ;-)
>> 
>> But seriously, it does sound heavyweight compared to a single sscanf
>> function call.
>> Honestly, std.stream is just barely functional enough to write the
>> simplest stream code, so I wouldn't be surprised if that's what it
>> takes to scan strings with it.  Not much worse than what it takes to
>> do it with std::stream in c++ though.
>> I'm really talking out of my ass though, because I can probably count
>> on one hand how many times written code to use scanf or stringstream
>> in my life.  If I have to parse input I'm much more likely to reach
>> for the regexp hammer or write a simpler parser.
>> 
> I could never quite figure out why Stream.readf was not separated out
> into a separate function in std.format.  It probably wouldn't be a lot
> of work.
> 

do it, submit patch, become hero. <G>


December 05, 2008
Jarrett Billingsley wrote:

> I could never quite figure out why Stream.readf was not separated out
> into a separate function in std.format.  It probably wouldn't be a lot
> of work.

I thought that was what std.unformat was for ?

But I would have put readf in std.stdio too...

--anders
December 05, 2008
On Fri, Dec 5, 2008 at 5:43 AM, Anders F Björklund <afb@algonet.se> wrote:
> Jarrett Billingsley wrote:
>
>> I could never quite figure out why Stream.readf was not separated out into a separate function in std.format.  It probably wouldn't be a lot of work.
>
> I thought that was what std.unformat was for ?

Such a library exists?  It's not in the D docs.  I don't see anything in the Phobos source dir either.

> But I would have put readf in std.stdio too...
>
> --anders
>
December 05, 2008
Jarrett Billingsley wrote:

>>> I could never quite figure out why Stream.readf was not separated out
>>> into a separate function in std.format.  It probably wouldn't be a lot
>>> of work.
>> I thought that was what std.unformat was for ?
> 
> Such a library exists?  It's not in the D docs.  I don't see anything
> in the Phobos source dir either.

It was suggested for DMD 0.128, but I don't think it made it.

--anders
1 2
Next ›   Last »