FIle I/O
Jonathan M Davis
jmdavisProg at gmx.com
Sat Sep 18 14:51:04 PDT 2010
On Saturday 18 September 2010 08:50:41 Graham Nicholls wrote:
> Thanks. I figured that it was a duplicate definition, but not if I leave
> out st.stream, then OpenException is undefined. Is there a documentation
> for the exceptions which are in the relevant packages - I'll struggle
> without it!
You'll have to look at the documentation for a particular module to see if it
defines any exceptions. If it doesn't list any, then odds are that if it throws
anything, it'll be Exception, but the docs may not be complete.
> And thanks, all for the help - much appreciated.
>
> BTW, am I making a mistake using 2.0 rather than v1.x?
> It seems that perhaps 2.0 is not entirely complete - the libraries are
> pretty fundamental, after all.
> Thanks again.
The language definition has stabilized (though there's still plenty of bug fixing
going on). Andrei Alexandrescu has recently release a book - "The D Programming
Language" - which goes over the language (highly recommended). However, Phobos,
the standard library is still very much a work in progress. Much of it will stay
as it is, but there's still a lot of work going on and changes being made,
though they try to not break code between releasing but rather deprecate code
and then remove it a release or two later. The definition of D2 only reached
stability a few months ago, so the work on Phobos has picked up since then.
D1 is really a different language, though D2 originates from D1. D1 is stable,
including the library. But Phobos in D1 is pretty pathetic really, which is why
many people use the third party library Tango (which is not compatible with
Phobos since Tango replaces some core stuff like the garbage collector). Tango is
very different from Phobos. Also, in using D1, you lose a lot of nice features
that D2 has.
Whether you use D1 or D2 depends entirely on what you're doing. A copy like
Boeing who needs completely rock-solid code, because lives depend on it, should
probably use D1. An individual writing code for themselves can use D2 just fine
as long as they're willing to put up with the occasional bugs in the compiler
and standard libraries as well as the fact that portions of the standard
libraries do change from release to release. Companies doing code that lives
don't depend on could use D2 as well, but how good an idea that would be would
depend on what they're doing. D2 is definitely stable enough for use, but Phobos
is still very much evolving and there are bugs in the compiler which pop up from
time to time which can be highly annoying. So, it all depends on what you intend
to get out of D2 and how much hassle you're willing to put up with. Personally,
I think that the occasional issue is well worth the power and flexibility of D2,
but you may not find that to be true for you. The compiler continues to get bugs
fixed, and Phobos is having lots of work done on it, so we are approaching the
point where it will be obvious that D2 is the one to pick rather than D1, but it
still depends at this point.
I wrote a longer response to a similar question on stack overflow (
http://stackoverflow.com/questions/3205509/what-are-the-current-challenges-of-
the-d-programming-language/3206985#3206985 ) a couple of months back.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list