Pause Self, Resume on Event
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Jul 17 18:13:22 PDT 2008
"dsimcha" <dsimcha at yahoo.com> wrote in message
news:g5oajj$2rfe$1 at digitalmars.com...
> Reading in a file. Yes, Phobos has streams for when you actually need
> serious
> features, but it has the dead simple read() function that doesn't require
> instantiating a class or anything like that just to read a file into an
> array of
> bytes. To be perfectly honest, the only parts of Tango I've really looked
> at hard
> are the threading and math stuff, since Tango is still basically for D1
> only and
> otherwise I haven't had a problem with Phobos, but AFAIK Tango is much
> more OO and
> verbose than Phobos. This isn't really a knock against it, it's really
> just
> personal preference, not that one is "better" than the other. On the
> other hand,
> Phobos just doesn't have a lot of the features I'd like.
I just don't know how to answer. I've never found "File("filename").read()"
to be particularly awful. It's not really any more OO than Phobos in most
places.
More verbose -- that's improving. Much of the verbosity in some of the
lower level functions is for performance (like passing buffers for output),
and I can't tell you how often I've been thankful for those lower-level
interfaces. There are an increasing number of "convenience" methods and
functions. That's one nice thing about Tango: if you _don't like_
something, _let the developers know_ and _they will do something about it_.
A cursory glance over the documents will also not give you what you need to
decide whether or not you like the library. I didn't like Tango at first,
but after a month of using it I came to realize how much better-designed and
flexible it is. Not having to duplicate 800 lines worth of functionality in
every one of my projects for such simple things as array manipulations and
string functions that operate on types other than char[] was also a nice
bonus.
So I know what you'll reply with next, "oh, well it's _too big_ for me, I
need a smaller library." Give it up. That's a horrid argument and you know
it.
More information about the Digitalmars-d-learn
mailing list