Java > Scala

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


On Sat, 2011-12-17 at 22:45 -0600, Caligo wrote:
[...]

I thought this thread had finished, but...
> 
> That's like saying people should take Coke and Pepsi more seriously because
> they have bigger market shares when in reality all you need is water.
> Money isn't real, you know?

Taking that paragraph out of the context of the previous emails in the
thread leads to misinterpretation of what was being said. 

> D is already a success, a BIG success.  Walter and Andrei (and the amazing
> community, of course) have created a programming language that is light
> years ahead of C++, Java and Go.
> 
> I don't think you know this, but every high school student who takes a
> computer science course is required to learn Java.  It doesn't stop there:

I didn't know this, but I guess it is only a factor in the USA.  In the
rest of the world, it is almost certainly not the case.  It definitely
isn't in the UK.

> in college and university it's all Java, too, and this has been going on
> for almost two decades.  And before Java it was mostly C++, but it was
> phased out.  Unless the course specifically requires a different

Well 15 anyway :-)

Up until 1985 or there abouts all educational institutions used Pascal.
The global mindset was that Pascal was THE language for teaching.  If
you weren't teaching and learning using Pascal, you were deemed
improperly educated.  At UCL, Paul Otto and myself set about revamping
the teaching of programming, initially using Scheme + C++ and later
using Miranda + C++.  This proved massively effective.  Students were
forced early to appreciate different paradigms of computation as well as
learning a language that was increasingly important in the real world.
We used SICP for Scheme which was great.  C++ had no books so I wrote
one, and that turned out well.  Miranda had no books originally so a
couple of colleagues at UCL wrote one, and that turned out well.

Then came 1995 and The Great Revolution:  Java hit the streets, Web
browsers got funky, and the international educators mindset
spontaneously switched to "virtual machines are great" with a smattering
of "programming using applets is so cool".  Almost overnight all
educators switched to Java.  I had moved to KCL which was still using
Modula-2, and revamped the programming.  I offered the folks the choice
of C++, Ada or Java as the first programming language, knowing that
Clean was used later in the course.  They chose Java.  Meanwhile at UCL
they switched to Java in 1997.  Many people were writing many books on
educating people using Java.  Graham Roberts at UCL and I at KCL needed
a book different to the rubbish that was being published in the switch
to Java fashion world-wide so ended up writing our own book, which
proved very successful.

The problem here is that educators forgot the importance of learning
multiple languages and especially multiple paradigms.  Java was used for
all teaching and students suffered.  If they had used Java and Haskell
and Prolog things would be much better.

I exited academia in 2000 as it was fairly obvious that the sector was
going to be ruined, at least in the UK, due to the dreadful rhetoric all
political parties were issuing.  Graham stayed at UCL though and has
managed to switch the early programming teaching to use Groovy and
Prolog followed by Java.  This produces far better programmers than any
other sequence I know of just now.

Obviously the Hawthorn effect matters:  students are enthused and made
better by having enthusiastic and knowledgeable teachers who inspire. 

> programming language (which is rare), you have to beg to use a different
> programming language (which I did).  Sometimes professors do allow other
> programming languages, but they mostly limit it to C/C++.  In most cases
> students either have to accept it and do what they are told to do, or fail
> the course.  If that's not indoctrination, I don't know what is.  Also, the

In a sense all education is indoctrination, but we probably don't want
to go there.

I suspect the major problem with most educators -- only in USA and Italy
are all educators called professors, in places like UK, France and
Germany, professor is a title that has to be earned and is a matter of
status within the system -- is that they are themselves under-educated.
Far too many educators teaching programming cannot themselves program.
Their defensive reaction is to enforce certain choices on their
students.  Sometimes there is a reasonable rationale -- you don't write
device drivers in Prolog, well unless you are using ICL CAFS -- but
generally the restriction is because the educator doesn't know any other
programming language than the one they enforce.  

> reason they restrict education to things like Java and C++ has very little
> to do with the fact that those languages have claimed big market share;
> rather, it's because corporations have had a vested interest in
> universities in the first place and they receive what they order.  Just
> look at what Microsoft has been doing in universities: everything from
> "free" gifts such as free copies of Windows OS and Visual Studio Ultimate
> that cost thousands of dollars to sponsoring various kinds of events.  The
> students who are influenced by such tactics, to whom do you think they are
> going to be loyal to?

I worry more about what Macdonalds does in primary schools.  Enforcing
pupils to learn to count by counting BigMacs strikes me as the worst
sort of indoctrination.

Your description of Microsoft's behaviour is a natural consequence of
the economic system.  Using marketing budget to indoctrinate people into
buying your product is all that is going on.  Some companies realize
that spending that money on molding the minds of 2--12 year olds is the
way of creating an income stream in the future.

> The _main point_ here is that if students had been give the choice to learn
> a programming language of their choosing, many of the so called
> "successful" programming languages would not have been so "successful"
> today.  So next time you decide to lecture someone on how popular or
> "successful" Java is, just remember how it got to be so "successful".

The single most important factor here is that people learn to program
using more than one paradigm of computation and thus more than one
language -- FOOPLOG and Scala are special case, that are interesting for
later study but not for initial study.

The importance of multiple paradigms isn't just waffle, the psychology
of programming folk have been doing longitudinal studies over the last
20 years that shows that people learn more, faster and end up being
better programmers.  People who learn with one language and use that
language for the rest of their programming lives are in general poorer
programmers because of it.


[...]
> I do see the entirety of the economic system of the world, and, no, it's
> NOT called capitalism.  It's called the Monetary System.  Capitalism,
> Socialism, Communism, etc,... they are all inherently the same because they
> are all based on the Monetary System.  Money is created out of debt, and
> money is inherently scarce.  Differential advantage and exploitation is
> name of the game, regardless of the form of government you have.  And as
> far as I know, India isn't even in the top five;  USA, China, and Japan are
> in the top three.

I beg to differ on the detail, but this is almost certainly not the
forum to have this debate.  You are right that the obvious political
labelling is not the whole story, but neither is the analysis using the
monetary system.  It is a multi-dimension problem.

In the end though people in positions of power will do their very best
to exploit those who are not. 

[...]

> I choose to ignore Java for technical and non-technical reasons.  Unlike
> you, I don't need to spend years of my life doing Java programming to
> realize what a joke it is, and I have never seen a case where Java was just
> as fas as C++.  This is one of those myths, or corporate propaganda, that's
> been propagated by educated idiots.  I and the teams I've been a member of

Have you actually done the benchmarks to back up this claim.  I have.  I
really rather object to being labelled an educated idiot.


> have solved countless CS problems that have required every kind of data
> structure and algorithm, and not once have I seen Java come close to
> C/C++.  On average, Java has been about 20 times slower than C++ and
> requiring on average 50 times more memory when it came to solving those
> problems.  If you honestly believe that Java can be just as fast as C++,
> then go to http://www.spoj.pl/ and pick a problem and submit a solution in
> Java that's no more than 3 times slower than C/C++ and requires no more
> than 10 times more memory.

Java certainly does use appalling amounts of memory, no argument there.

For the reason you (should) know perfectly well Java is never going to
perform well on the sort of benchmarks these sites look at because they
use a protocol of testing that is inherently and systematically biased
in favour of running a program from start.  C, C++, D will always thrash
Java in this context.

Where Java competes very well with C, C++ and D is in long running
computations.

If you want to look at even more biased benchmarking look at
http://shootout.alioth.debian.org/ it is fundamentally designed to show
that C is the one true language for writing performance computation.

[...]
> I'm not easily offended, and I've learned to let go.  I love to be proven
> wrong because that's when I learn something new.  I think you are having a
> harder time with this than you realize, and it's easy to understand why:
> you have spent years of your life with pointless creations such as Java,
> and they are now part of your identity.  Of course you are going to get
> upset when someone labels Java as something of a joke because you take that
> statement personally and see it as an attack on who you are.  It's okay.
> Just learn to let go.  You still have time.

You really have totally missed where I am coming from, so I think it
best you simply stop trying to analyse my position.

I am not even going to try and defend myself against the slur you have
made against me, it is not true, and if you had read my emails rather
than trying to be an amateur psycho-analyst, you would already know
this.


-- 
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/24698243/attachment-0001.pgp>


More information about the Digitalmars-d mailing list