Input handling? (newbie alert!)

Jonathan M Davis jmdavisprog at gmail.com
Sun Sep 12 06:06:08 PDT 2010


On Sunday 12 September 2010 04:18:01 Cavalary wrote:
> Yeah, one of the reasons why it made sense to me I guess, as the
> term's "informatica" in Romanian, so the mental link was instant
> even if I probably never heard it used in English before.
> 
> A programming language that doesn't put effort into teaching
> people how to use it isn't exactly likely to end up with a
> significant userbase, don't you think?l

There are higher priorities at the moment. For the most part, the folks who 
would be working on examples and the like are busy on dmd, druntime, and/or 
phobos. While D and dmd have essentially stabilized now as far as features go, 
there's plenty of bug fixing to do, and Walter is busy on things like the port to 
64 bit and making shared libraries work. And more importantly, yhobos is still 
very much a work in progress, so while much of it is going to stay the way that 
it is more or less permanently, there's plenty of it which is still in flux, so 
it doesn't make a lot of sense to create a whole lot of examples using it. As it 
matures, I'm sure that there will be more example code, but it's still pretty 
young at this point.

> readln seems to do well enough for input for the moment. I'll be
> looking into file I/O later.
> Just put in my first working try-catch last night too. (After
> scratching my head a lot because from the example I was given I
> assumed catch needed a random parameter, though I didn't
> understand why. Then the compiler errors made me try with no
> parameter (as in catch()), variable types, the word "class",
> either alone or followed by various things (since it said it only
> accepted classes)... Eventually found a post in the learn archives
> that said that if you want catch-all you just put in catch with no
> parentheses and went duh!)

Typicall what you'd do is use catch(Exception e), so you can do things like 
print the exception, but catch without parens will work (you just don't have 
access to the exception).

> About seriousness... At the moment I don't even know if I'll still
> have it installed next week. And I'll need to be REALLY serious
> about something to shell out $40 on a book about it! And there's
> also the matter of availability over here (though Andrei's name
> says he was most likely at least born here).

That's totally understandable. However, since D2 has recently become  
essentially stable feature-wise (as in within the last few months), TDPL is 
pretty much _the_ source for anything in-depth on D (though, as phobos isn't 
particularly mature yet, it doesn't cover much of phobos). As time goes on, I'm 
sure that online resources will improve, but D has been in flux for so long as 
it's been being developed, that online examples and the like tend to be out of 
date or nonexistent. With time, that will change though. As for availability, I 
don't know the best way to get it in Romania, but I know that folks in Europe 
have ordered it from Amazon without any problems. And while I don't know if 
Andrei was born in Romania, as I understand it, he does have family there, and 
he has an accent, so he probably was.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list