"retard" <r...@tard.com.invalid> wrote in message 
news:hevn56$2to...@digitalmars.com...
> Mon, 30 Nov 2009 04:51:19 +0000, dsimcha wrote:
>>
>> Yeah, I dislike Tango's (and Java's) I/O design.  I think it's a classic
>> example of overengineering.  I don't care how efficient, flexible,
>> complete, etc. it is if it doesn't "just work" for the simple stuff.
>
> Are you sure you know what you're talking about?
>
>> By
>> far the two most important pieces of I/O functionality I need are:
>>
>> 1.  Read a text file line-by-line.
>
> foreach (line; new Lines!(char) (new File ("foobar.txt")))
>  Cout (line).newline;
> }
>
>> 2.  Read a whole file into an array of bytes.
>
> new File("foobar.bin").read()
>

Sure, once you actually know that and remember it. But trying to discover 
them in the first place (and discover what modules to import, and how many 
are needed for #1 up there?) through the API reference is a royal PITA. Part 
of the problem is that there's about million different classes, modules, 
structs, functions, whatever all dealing with accessing a file. So I have to 
figure out which method to use, which is made extra painful by the fact that 
each way of going about it is spread out across at least three different 
modules out of a total of I-don't-even-want-to-count. And of course there 
are zero "all" modules which just leaves me bouncing back up to the imports 
section of my code every time I make an edit.

"But it's right there in the tutorials, don't go looking through the API ref 
for it!" Well, ok, but there have been a lot of things I've needed to find 
(such as more in depth details) that the tuts don't tell me, and that I've 
had to look through the API ref or even source to find. So now I have to 
worry about not only what module to look in for what I want, but also which 
set of docs.


Reply via email to