Pause Self, Resume on Event
Sean Kelly
sean at invisibleduck.org
Thu Jul 17 22:29:01 PDT 2008
dsimcha wrote:
> 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.
So use tango.stdc.stdio. Seriously. I know some Tango folks would
probably not agree with this suggestion, but it's portable, fast
function-based IO.
> What I personally would like to see in the ideal world is for Phobos to become
> analogous to the C++ standard lib, i.e. simple in both features and API, very
> highly tested and optimized, "official", etc. and for Tango to become analogous to
> Boost, i.e. more complex, feature-rich, etc. and more of a "standard add-on lib"
> than a second "*the*" standard lib. However, IDK how much they've diverged and
> whether using them together will grow more or less feasible with time.
It's obviously a matter of opinion, but I think Tango has a better
runtime and overall low-level support than Phobos, so I question the
suggestion to make Phobos the core to build upon.
Regarding Tango in particular--our goal was always to have Tango be
modular and lightweight, and although Tango has grown a bit beyond this
I think it's still a more lightweight library than Phobos insofar as
executable size is concerned. Modules in Phobos tend to have far more
dependencies than those in Tango, for example, so you'll often find that
by importing something that seems pretty basic you'll end up pulling in
a ton of other stuff as well. Worse, the runtime code pulls in this
stuff as well because it calls various user packages for runtime-level
work. Phobos is fine for everyday applications programming but I
personally wouldn't choose it for a serious systems app (still obviously
my own very biased opinion of course).
Sean
More information about the Digitalmars-d-learn
mailing list