while true: !!!
aleaxit at yahoo.com
Tue Dec 19 18:24:44 CET 2000
"Carsten Geckeler" <nospam at no.spam> wrote in message
news:mailman.977243949.24318.python-list at python.org...
> > My claim is that Python is simpler, clearer, and MORE effective,
> > for NOT trying to draw this level of distinction.
> Right, it's more effective with regard to programmers' work, but
> definitely less effective according to speed.
Not because of the specific lack of distinction between
character and string-of-length-1, no. Remember Java DOES
draw the distinction but speed of typical Java and Python
programs are comparable (and have been for years, though
Java keeps *promising* future speedups).
> > > Do you know anything faster than this? It just writes the byte char
> > > the memory space pointer str + 3. In most cases strings do consist of
> > > chains of bytes in memory.
> > Not sure what you mean by 'chain' here -- Haskell is the only one
> Is array better?
Definitely better -- it IS a frequent computer-science term.
> > I program in C when I must (though I'd much rather take a
> > step up to C++, which I can in most situations but *NOT* when
> > I want my Python extensions to be taken seriously by the
> > Python community, alas...). That doesn't mean I have to
> > _like_ it:-).
> Right. Take what programming language you like. But the fact that Python
> and kernels are programmed in C shows, that you always use the language
> that fits your problem. I love programming in Python, I also like Perl,
> and I also program in C. And probably I will also program in Fortran
> during my thesis (although I HATE Fortran). But that's it: If you need
> pure speed, Fortran is just a better choice than rare Python. If you need
> high-level construct whithout -- almost -- the work of type declaration,
> Python is the better choice.
The best choice, for speed and for anything else, is to use "N"
languages for some N >= 0. N==2 is a frequent case -- some low
level language for the speed-crucial bits, some high-level one
for the rest (often over 80% of the overall functionality).
N==1 is sometimes best, but hardly ever [a] for a big component
and [b] for a language of low level (kernels are not programmed
in ONE language -- they have some machine language as low-level
and C/C++/etc as the higher-level for most stuff).
> C++ with the STL is very nice. ;)
Yes, and with Boost on top (www.boost.org) even better -- Boost
builds on Standard C++ Library ideas (which you also find in STL)
to add many useful functions, such as Python extending in C++.
More information about the Python-list