Theiling Online    Sitemap    Conlang Mailing List HQ   

Re: OT: Power in programming languages.

From:Mark J. Reed <markjreed@...>
Date:Thursday, January 6, 2005, 14:58
CB = Chris Bates
KG = Keith Gaughan

CB> and because there are some things difficult to do in perl which are
CB> easier in C.

Could you give me an example?  Very early on, as Perl grew out of its original
problem domain, it was extended in ways specifically designed to make
C-ish things as easy as they are in C, without giving up the power of
the higher-level constructs.  You sacrifice performance, but not
expressibility.  About the only thing I can think of that isn't
well-supported by Perl5 is multithreading (although that's arguably not
well-supported by C either); various attempts to add it
failed in different ways due to earlier design decisions at the
implementation level, which is part of the reason they started from scratch
with the Perl6 implementation.

KG> I disagree with your comparison. You can't compare C and C++ to the
KG> likes of Perl, Java and C++.

You can't compare C++ to C++?  Is that kind of like how nil is not equal
to nil? :)

KG> They're aimed at different problem domains

And I would say that there are more than two categories.  In the same
space as Perl you have competitors like Python and Ruby; also TCL and
Scheme (especially guile), although they don't quite fit exactly the
same niche.  Overlapping that space in one direction you have things
like the UNIX shells, AppleScript, and the Windows Scripting Host (or
even batch files, but they're pretty far removed from the rest in terms
of capability).  Overlapping in the other way you have the "systems"
languages like C and many others.

I would say that you need a third dimension to fit things like
SmallTalk, Java, and C# into this picture.  While you can do systems
stuff in them, especially in C++, they're mostly designed to operate on
top of a higher level of abstraction than an operating system API.
They're not so much languages as entire platforms unto themselves,
designed for solving application problems rather than interfacing with
other tools or directly with the operating system.   In that way,
despite their refined status as "real" programming languages with computer
science credentials, they have a lot in common with lowly "scripting"
tools like JavaScript and Flash ActionScript.

KG> But O'Caml is still the more powerful language. Why? Because you have to
KG> worry about fewer things in O'Caml than you do in in C, types and memory
KG> being examples. This is the best measure of power.

I disagree here.  I have yet to encounter a valid claim about
"not having to worry about" various aspects of software development.
In Java, you still have to worry about memory.  In "typeless"
languages, you often find yourself working around the lack of types (of
course, in strongly typed languages you often find yourself working
around the need for a more generic interface to something).  Everything
in programming design is a trade-off.  I like some things about O'Caml,
and dislike others.

-Marcos

Reply

Keith Gaughan <kmgaughan@...>