Python vs C for a mail server

Randall Parker techiepundit at futurepundit.com
Tue Jan 31 15:52:32 EST 2006


But languages that share some weakness typically do not share it
equally. Three languages can have some way to do X (which some might
find undesirable while others find it great) but two of the languages
might make it easy to solve problems without ever doing X while the
third language might make it impossible or at least very difficult to
solve problems without doing X.

C++ provides ways to be type unsafe. Does that mean that C++ is type
unsafe period? Most code in C++ is going to be type safe. Some
programmers will never do dangerous casting. Others will do bad things
with casts.

I really think one has to factor in probabilities rather than state
comparisons between languages in simpler terms.

I also think that the number of ways problem domains differ that affect
language choice varry in a lot more ways than, say, whether they have
garbage collection built in. Maybe in Google where the coding is
primarily for servers the need or lack thereof for explicit control
over memory allocation is by itself reason enough to say yes or no to
C++. But in other companies solving very different sets of problems
(e.g. embedded devices with no operating system or embedded devices
with limited RAM or limited CPU or an OS with few languages available)
a lot of other factors play in the equation.

Alex Martelli wrote:

> The context is: can any other language be different in this respect?
> Only by not allowing *any* way to get symbols dynamically, and therefore
> by substantially reducing the real-world cases in which it's usable.
> C++ (with dlopen/dlsym and equivalent libraries on other platforms, with
> dynamic_cast, ...) and Java (with 'reflection' etc) do afford this
> functionality, albeit in more cumbersome ways than Python.  Therefore,
> if the inability to verify that a function named 'foobar' is in fact
> never called anywhere is a weakness, it's a weakness shared by all of
> these languages.  The originator of this thread appeared to assume that
> it was a weakness of Python and not of C++...
> 
> 
> Alex




More information about the Python-list mailing list