Java > Scala

Russel Winder russel at russel.org.uk
Sat Dec 17 22:36:41 PST 2011


On Sat, 2011-12-17 at 21:01 -0800, Jonathan M Davis wrote:
[...]
> In my experience, it's the professors who get to choose what they're teaching 
> and the main reason that Java is used is a combination of its simplicitly and 
> the fact that it's heavily used in the industry. C and C++ have a lot more 
> pitfalls which make learning harder for newbie programmers. Java does more for 
> you (like garbage collection instead of manual memory management) and has 
> fewer ways to completely screw yourself over, so it makes more sense as a 
> teaching language than C or C++. And since the primary focus is teaching the 
> principles of computer science rather than a particular programming language, 
> the exact language usually doesn't matter much.

Not sure about in the USA, but in the UK and other places I have been an
examiner, educators (not all of whom are professors since that is a high
level position in many places not just a synonym for educator) do not
have a totally free choice.  There are processes in place through which
choices have to be put and hence validated by more than just the
individual. 

I suspect far too many educators use Java because everyone else does,
and that they don't actually think about the choice they are making.

Increasingly, from what I hear, educators are moving away from Java as a
first programming language.  I think this is a good move.  Using
languages like Python makes for much easier learning of programming and
the principles of programming.  UCL looked at this, but had the
constraint of having to teach Java in the second year, so went with
Groovy rather than Python.  Followed by Prolog.

It is using more than one language that makes for best education.

> Now, this _does_ have the effect that the majority of college students are most 
> familiar and comfortable with Java, and so that's what they're generally going 
> to use (so there _is_ a lot of indoctrination in that sense), but that's 
> pretty much inevitable. You use what you know. Ultimately though, that's 
> what's likely to happen with most any university simply because teaching 
> programming languages is not the focus - teaching computer science is. And for 
> most of that, the language isn't particularly relevant.

Sadly too little computer science gets taught in most universities and
colleges as well as too little programming.

And yes, if these institutions teach with Java then the bias is towards
Java in the job market.

Corollary to all this is everyone on this list should go into academia
and start teaching all the introductory programming courses using D.
Except at Texas A&M where C++ will continue to be used.  :-) 

> And Java was successful before they started using it in universities, or it 
> likely wouldn't have been used much in them in the first place. It's just that 
> that has a feedback effect, since the increased used in universities tends to 
> increase its use in industry, which tends to then make the universities more 
> likely to select it or to stick with it as long as they don't have a solid 
> reason to switch. But I believe that the initial switch was a combination of 
> the fact that its popularity in industry was increasing and the fact that it 
> works much better as a teaching language than C or C++. It's not because of 
> anything that corporations did (aside from saying that they used it), since 
> Java isn't a language where donating stuff or discounting really helps (unlike 
> C++), since almost all of the tools for Java are free.

At UCL and KCL we had switched to using Java long before it was an
industry requirement for jobs.  Overall though I think this is a chicken
and egg situation.

In all of this, the issue of portability of code has seemingly been
missed.  One of the main reasons for Java in 1995 (other than the
trendiness of Web browser programming) was portability across all
platforms.  This made the sys admin of provision of resources  for
programming classes significantly less than it was.  C, C++ and D cannot
match this even today.  Back then it was a Big Win (tm).

Interesting to note how Intel put much marketing and sales resource into
C++ and associated tools.  It's all about lock in.  Which is fine if
portability is not an issue.

Someone once coined the term WORA (write once run anywhere) -- which
really is a (tm) phrase -- and yet this is a total lie with respect to
Java.  It sort of worked when there was only Java 1.0, but already when
1.2 came out it was clearly a fib.  Now with Java 5, 6, 7, ... it is a
clear lie.  Hence OSGi and Project Jigsaw.

The problem is basically the same as with dynamic linking in C, C++ and
D, you have to know exactly the right soname for the library you use.
The Go folk have got round this by ignoring dynamic linking and
insisting on static linking of all code.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111218/de851f4e/attachment.pgp>


More information about the Digitalmars-d mailing list