Re: Choosing a PL - What you can do or how you do it?
- From: ezkcdude <zamir.evan@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 13:53:12 -0000
On Jul 29, 11:58 am, Chris Barts <puonegf+hfr...@xxxxxxxxx> wrote:
e...@xxxxxxxxxxxxxxxxx < e...@xxxxxxxxxxxxxxxxx> wrote on Friday 27 July
2007 13:38 in comp.programming
<1185565136.200333.246...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
The title may be unclear. When choosing a programming language, I
think there are two, perhaps, mutually exclusive options, namely a) PL
that enables you to do whatever you want to do, but not necessarily
the way you (or your friends) would like to do it; and b) PL enables
you to do things the way you (and your friends) like, but not
everything you (and your friends) want/need to do.
A more important metric is how easily you can express the solution without
resorting to implementing another programming language in your program.
Greenspun's Tenth Rule of Programming: "Any sufficiently complicated C or
Fortran program contains an ad-hoc, informally-specified bug-ridden slow
implementation of half of Common Lisp."
This rule applies to a lot of things: People tend to re-implement databases,
threading libraries, and even garbage collection.
For example, I
think it's generally agreed that with C/C++ one can pretty much do
anything in the world one could think of with a computer program -
Not really, no. There are lots of things you cannot reasonably express in C
or C++. Helpful type systems, higher-order functions, and declarative
programming come immediately to mind.
I understand the desire to have these things in a programming
language. They make the programmer's life easier. However, these are
examples of programming techniques, not programs, in themselves.
Whatever program can be written using HOF, may look cleaner or
prettier in Haskell/Lisp/ML, but that doesn't mean C/C++ couldn't
achieve the same results (i.e. output. OTOH, I can point to a C
program like FFTW, and ask, could that be done in pure Haskell? (If
the answer is "yes", please let me know.)
including meeting real-world practical criterion, such as real-time
speed. On the other hand, more elegant/academic languages, such as
Haskell/Lisp, may be preferred by some for how they let you do things
(and express "personality" in doing those things) - even though these
languages may not be able to do all the things that one may need to do
in the real world.
Depends on what foreign function interfaces you have to hand. Common Lisp
with CFFI is quite powerful and can do quite a bit.
The reason I bring this up, is because I have been sort of on a "meta-
learning" quest to grok Haskell. From everything I read on the web and
in textbooks, Haskell does emphatically impress the geeky/academic
side of myself that would like to use the language for everything.
However, there are some things, for example real-time image
processing, that I think Haskell simply won't be able to do - that is
without interfacing an "uglier" low-level language.
I don't know how ugly FFIs are from Haskell. They aren't bad from Common
Lisp.
why do
necessary languages like C/C++ get such a bad rap, when it is pretty
clear we can't actually live without them?
Because they are unhelpful, weak languages that require massive amounts of
work from the programmer to do even simple things, and the work required
quickly ramps up into the unmanageable. For example, it would be
essentially impossible to give a real object system to C++, whereas it was
done repeatedly for Lisp prior to the Common Lisp standards project
blessing CLOS. C and C++ force you to straitjacket your thoughts into their
model, as opposed to being able to adapt to you and the problem at hand.
--
My address happens to be com (dot) gmail (at) usenet (plus) chbarts,
wardsback and translated.
It's in my header if you need a spoiler.
.
- Follow-Ups:
- Re: Choosing a PL - What you can do or how you do it?
- From: ezkcdude
- Re: Choosing a PL - What you can do or how you do it?
- References:
- Choosing a PL - What you can do or how you do it?
- From: evan
- Re: Choosing a PL - What you can do or how you do it?
- From: Chris Barts
- Choosing a PL - What you can do or how you do it?
- Prev by Date: Re: unusual makefiles - problems with rules
- Next by Date: Re: Choosing a PL - What you can do or how you do it?
- Previous by thread: Re: Choosing a PL - What you can do or how you do it?
- Next by thread: Re: Choosing a PL - What you can do or how you do it?
- Index(es):
Relevant Pages
|