Hacker News new | ask | show | jobs
by tmtvl 886 days ago
I'd throw Python out too, as it's just far too slow*, which would set wrong expectations for learners. While itmcaan be sped up by writing everything in C and calling it from Python you've already thrown C out, so that's not an option. The languages remaining are very unfortunate though: JS is infamously the language designed in 14 days, and Go is a Google project, so I wouldn't be surprised if programming in it awakens Deep Ones to feed on your sanity.

* <https://github.com/attractivechaos/plb2>

3 comments

Why would execution speed be particularly relevant? Python is slow but that hasn't stopped many useful applications from being written it, plus proper use of libraries written in C (e.g., numpy) again mitigates the issue.

From a learning perspective, a slower language could actually be beneficial in the sense that it's impractical to brute force a solution to a problem in a way that you can get away with in C or similar.

Too slow for... what?

For beginners, whose main concern is implementing basic data structures/algorithms, Python is fine.

I still use Python for daily scripting (sorry, don't get along with Bash) and it's runs pretty fast.

> I'd throw Python out too, as it's just far too slow*, which would set wrong expectations for learners. While itmcaan be sped up by writing everything in C and calling it from Python you've already thrown C out, so that's not an option.

I'm not sure I follow you. Are you saying using e.g. numpy is not okay because it's implemented in C? How does that make any sense? The cpython interpreter itself is implemented in C so everything interpreted by cpython is just as much "in C" as something else like e.g. numpy.