Perl or Python?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Jul 6 18:22:03 UTC 2009


On Mon, Jul 06, 2009 at 12:51:05PM -0400, Christopher Browne wrote:
> On Mon, Jul 6, 2009 at 11:00 AM, Lennart
> Sorensen<lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> > So overall, the only impression one can get is that java is either a very
> > crappy language, or it attracts incredibly bad programmers, or maybe it
> > just makes people incredibly bad programmers.
> 
> The fundamental problem is that any language that becomes popular
> will, by sheer virtue of popularity, attract the "worst element" of
> bad programmers.

But if the language encouraged good things, then that might not be so bad.
It seems the popular ones never do though.

> The only language in which I haven't seen much terrible code is
> Prolog, and that's a language sufficiently esoteric that only
> interested programmers (who are likely to not be TOO incredibly bad)
> wind up using it.

Prolog is certainly weird.  I haven't used it much at all, but I have seen
some stuff written in it and been rather amazed that you could do such
things in prolog.  It is much more capable that I thought it could be.
My wife likes prolog.

> - In academic programming courses, students write spectacularly
> horrible Lisp code.

Yeah probably.

> - I don't see much bad C anymore; it's no longer "hot," so bad
> programmers don't pick it up.  Ten years ago was a different story...

There is plenty of bad C code around.  Maybe not much horrible C code,
but plenty of bad C code.

> - PHP is "hot," ergo I have seen a fair bit of horrid PHP code.  I try
> to avoid it like the plague, now, but have certainly seen awful bits.

PHP is amazingly nice to work with.  It unfortunately makes it much too
easy to make security disasters.  It is very easy to do things that work
great, but also permit things you never thought of.

> - C++ used to be popular, and 10 years ago, was attracting that "worst element."
> 
> Java became popular as a specific consequence of the troubles with the
> "worst elements" working with C++...  The handling of memory
> management in C++ was Really Really Horrible, between memory leaks and
> crashes.

To some extent the fact java hides memory management from the programmer
seems to work as an excuse to no longer care about memory use.  RAM may
be cheap, but I have other things I wanted to use it for.

> Java was a meaningful replacement for C++, in that:
> a) It has similar syntax, loosely similar semantics, and a loosely
> similar object model

I think both have horrible syntax.

> b) Its memory management system is a whole lot safer.  None of the
> direct pointer manipulations that lead to segfaults, and garbage
> collection is safer than the usual explicit destroy() calls of C++.

It is also very easy to write programs that consume 500MB of ram for no
apparent reason.

> It therefore allowed nearly 100% of the "bad C++ programmers" to
> migrate to being slightly-happier "bad Java programmers."
> 
> I think this is way more a demographic problem than a technological problem.
> 
> I tend to agree with your technical criticisms of Java; I think it's
> "object oriented to a fault," *except* that it's also simultaneously
> "not OO enough" in some respects (e.g. - integer isn't an object type
> when Integer is).

It's a very badly designed language.  That might also be the reason they
had to go through so many incompatible versions to get where they are now.
How many GUI tookkits did they go through so far?  2?  3?  Besides,
the bad programmers aren't qualified to do OO properly in the first
place and now they have to do everything that way?

> But I think you've got the causality backwards.

No, I think to a large extent the design of the language encourages it.

And the everything is OO is simply a mistake.  LISP probably takes it
too far the other way with everything is a list or function.

Some things should not be classes/objects.  Some stuff really should be
control logic, and not part of any class or object.

Some languages seem to take the standard runtime too far.  How big
is the standard java runtime set of libraries that every java version
expects to have?  What about .net?  Sure you can write a handy tool in
.net in 5 minutes, but the user needs a 60MB runtime downloaded to use
your little handy tool.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list