D Programmer Jobs at Sociomantic Labs

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Mon Nov 4 15:03:23 PST 2013


On 11/4/2013 12:10 PM, Craig Dillabaugh wrote:
>
> While D code can quickly become complex relative to Java, at the
> same time I think in a beginner course/book could easily be geared
> to keep away from D's fancier features and just teach basics.
> For example, code for reading a text file in in Java is (top
> answer on SO):
>
> static String readFile(String path, Charset encoding)
>     throws IOException
> {
>     byte[] encoded = Files.readAllBytes(Paths.get(path));
>     return encoding.decode(ByteBuffer.wrap(encoded)).toString();
> }
>
> vs.
>
> readText(filename)
>
> in D. Not really up on Java these days, so perhaps Java now
> includes a readText() like method now.  Anyway, hard to beat the
> D version for
> easy!
>

Yea. In college, I was a CS tutor for the first year programming 
students. This was at a school that used Java. I can personally vouch 
that Java's a terrible language for beginners. (Well, and for everyone 
else, really ;) )

A major part of the problem is Java's religious fervor for OO. There's a 
natural tendency for the students to end up being taught OO *before* 
they have a sufficient grasp on flow-of-execution (In fact, Java makes 
it difficult for the teachers to avoid doing that.) But, OO is an 
*architectural* concept that's completely meaningless (and in my 
observations, extremely confusing) without some form of either 
imperative or declarative foundation.

The other issue is Java's insane amount of boilerplate. Great way to 
teach beginners that programming is tedious.



More information about the Digitalmars-d mailing list