What to do after Python?

Johann Hibschman johann at physics.berkeley.edu
Sun Feb 18 21:28:53 EST 2001

Sheila King writes:

> On Sun, 18 Feb 2001 12:42:31 -0800, Erik Max Francis <max at alcyone.com> wrote
> in comp.lang.python in article <3A9033B7.D5ADA989 at alcyone.com>:

> I must say, that I am shocked at the number of apparent *groans* over C++
> language, in this thread.

Really?  Any language that encourages

vector<double>::iterator end = vec->end();
vector<double> out(vec->size);
for(vector<double>::const_iterator i = vec->begin(),
    vector<double>::iterator j = out->begin();
    i != end;
    ++i, ++j) {
  *j = (*i)*(*i);

as the right way to square a vector is, well, not quite the way I'd
want to do that.  Personally, I prefer something like

(map-into (make-vector (length vec))
          #'(lambda (x) (* x x))

The whole STL thing seems incredibly verbose, and there's no way
that's really needed.  I wouldn't want to try to teach that to people.
I guess that's just my preference.

Johann Hibschman                           johann at physics.berkeley.edu

More information about the Python-list mailing list