Hacker News new | past | comments | ask | show | jobs | submit login

One reason we have lots of people in numerate disciplines using Python is that we taught them Python. Python is very teachable. Given a class of average 19 year old students from a numerate discipline, my colleagues will teach most of them Python to a reasonable standard in a single module (so e.g 2 hours of teaching per week over 16 weeks).

The same would not be true if we were supposed to teach them C++ for example. It's a huge, sprawling language, full of difficult concepts that are unfriendly to teach, and equally filled with foot guns that if you don't teach them will definitely maim your students, but if you do teach them take up yet more precious time on minutiae.

Safe Rust wouldn't be as hard to teach as C++ but it's no picnic. So even if the Chemists decided that ideally they'd like their undergraduates to learn Rust instead of Python, I think the argument would be that it can't be done on the existing timeline.




Now we teach them Python, because the ecosystem and mindshare is there. But why didn't Perl or Ruby (or Tcl) win? It seems like Ruby didn't get the right ecosystem around it, but Perl has PDL (which does seem to predate much of the Python scientific ecosystem), and had SWIG support before Python. Maybe there's a lesson there for the Rust scientific ecosystem?


> . But why didn't Perl or Ruby (or Tcl) win?

That is a very good question.

IIRC at the time Perl had a bad reputation because of the weird syntax "$%@" (not weird to shell programmers, so much, but they were weird...)

Python was "object orientated" and from a computer scientist.

Perl is very imperative and informal. Python felt to people like a real language, Perl did not.

I am reaching for reasons as I was very disappointed that Python was the winner. I have never liked Python (personal taste - meaningful white space? Really?) and knew Perl very well.

(Perl Vs. PHP is a different, much more interesting, and tragic story)


> Python is very teachable. Given a class of average 19 year old students from a numerate discipline, my colleagues will teach most of them Python to a reasonable standard in a single module

Compared to Perl, sure, Python is teachable. But I'm willing to speculate that Safe Rust as a semi-pure functional language (basically: when in doubt, .clone() all the things and don't even think about the minor hit to performance) can also be taught as a first-time programming language. Rust may be at a disadvantage to Python wrt. bindings to the existing ecosystem of C/C++/F0RTRAN scientific codes, but that's a temporary state of things.


To science majors? No. It lacks so many of the things you'd need to get them started (e.g. a REPL/notebook server, interactive plotting, a "here's everything you need" install (a.k.a conda)), and most (but not all) students have no real interest in learning to program. You could get the interested-in-programming ones to learn Rust, but then they're going to hit the large legacy of existing code and wonder why you taught them something that not related to what they're going to use.


There's an interesting experimental project for a Rust REPL and notebook interface at https://github.com/google/evcxr . Other things, e.g. semi-officially endorsed collections of community crates with no strong backward compatibility guarantees, have seen some development already.

> but then they're going to hit the large legacy of existing code and wonder why you taught them something that not related to what they're going to use.

OTOH other languages should be easier to learn by reference to a comparatively elegant language like Rust. Python, Fortran, C++ etc. have almost nothing in common but Rust could arguably be a good introductory baseline that shares features with all of these.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: