Live data from Hacker News

Retiring Python as a Teaching Language

prog21.dadgum.com

21–30 of 238 posts

Re: Retiring Python as a Teaching Language

#21
Javascript has been around for close to 2 decades. I'm somewhat curious if there's a change in Javascript that has changed your mind, or is it something you think should have been true for the past 10+ years?

Re: Retiring Python as a Teaching Language

#22
just the opposite. Many teachable subjects from Journalisism to data science, biology to finance increasingly include Python. NLTK, Beautiful Soup, Pandas, Ipython Notebook, Matplotlib... Programming is a tool for getting things done, and few languages offer students more tools for doing than Python. On HN we sometimes forget the ubiquity and pure value of automation and anaysis. We focus perhaps too much on software engineering (in this case gaming).

Re: Retiring Python as a Teaching Language

#23

As much as i can't disagree with the choice (the realpolitik of programming has made it the most correct choice), i am saddened that the language on which the choice falls is one not chosen based on any merit, but merely due the historical accident of being the first to be implemented in a browser and having had no appreciable opposition due to browsers at the time being in hands of corporations. In "A Deepness on th…

I thought Java was the first to be implemented by the browser?

Re: Retiring Python as a Teaching Language

#24
post #23

As much as i can't disagree with the choice (the realpolitik of programming has made it the most correct choice), i am saddened that the language on which the choice falls is one not chosen based on any merit, but merely due the historical accident of being the first to be implemented in a browser and having had no appreciable opposition due to browsers at the time being in hands of corporations. In "A Deepness on th…

I thought Java was the first to be implemented by the browser?

Maybe as a plugin, but from what i can tell Javascript was the first to be supported natively: http://www.javascripter.net/faq/javascr3.htm

Re: Retiring Python as a Teaching Language

#25
post #5

It's with all of this in mind that my recommended language for teaching beginners is now Javascript. I know, I know, it's quirky and sometimes outright weird, but overall it's decent and modern enough. Javascript is a flawed, quirky language, but with the upcoming ES6 and ES7 standards it's going to be a much, much better. I'd call it a tossup comparing it to Python or Ruby. I wouldn't have recommended JS to a beginn…

What's pretty funny is that the new features in ES6 and ES7 makes a lot of the patterns/mishaps/X-parts from the last 15 years pretty irrelevant or less-obviously-'the way'.

Examples:

  * "Class" syntax
  * Comprehensions
  * Modules
  * `let` scoping
  * Generators
It's a whole new ball game.

I think a lot (over 50%) of JavaScript devs 5 years from now will still be using <= ES5, but only because they've so settled in their ways over the last 10 years.

Re: Retiring Python as a Teaching Language

#26
post #11
post #2

JavaScript (or rather: a subset of it) is a fine teaching language too, especially since it's easy to publish runnable code - even for beginners. However, there is no language that can do everything equally well. It's a common reaction displayed by the proponent base of many languages, even here on HN, to advocate the use of their language for every conceivable need. This can't possibly work well. Programming teacher…

> It's a common reaction displayed by the proponent base of many languages, even here on HN, to advocate the use of their language for every conceivable need. This can't possibly work well. Is that some law of nature, or merely a consequence in how we've designed languages thus far? A well designed type-infered statically typed language with a REPL/interpreter, a fast AOT compiler, an optional GC, good documentation…

Optional gc is not something I've seen work in practice. Apple abandoned their attempt because of the difficulty getting gc'd and non-gc'd code to play together nicely. Rust has (and may again) offer something like optional GC, but it will operate at the value level rather than the program level and thus doesn't really solve the library problem.

Programming languages are designed in a huge, multi-dimensional space. Should the language be static or dynamically typed (or optionally typed)? Interpreted or compiled (or JIT'd)? Manually memory managed or gc'd? Powerful or simple type system? Large (C++) or small (scheme)? Batteries included? Hosted on a runtime?

Each of those questions (and of the dozens more than go into designing a language) involves tradeoffs. Manual memory management makes a language suitable for domains like kernels and games, but inevitably requires the user be aware of where and how memory is being allocated and deallocated. Small dynamically typed programs tend to be (in my experience) faster and simpler to write, but static typing makes maintain large codebases much easier.

I strongly believe there will never be a language that is the best available for all domains. Currently I find that I need three languages to cover my bases:

  * A dynamic, batteries-included scripting language (Ruby)
  * A static, fast, gc'd language (Scala)
  * A static, fast, non-gc'd language (C++)
I'm hoping that Rust will collapse the last two, but there are still a lot of tradeoffs.

Re: Retiring Python as a Teaching Language

#27

So incredibly in favor of this. I love python, it's probably my favorite language. I taught a class on it in Boston. But these exact questions have indeed brought doubts into my mind. Year after year I'm disappointed by what python simply cannot provide in any straightforward way. The options are very few for making games. The options are very few for desktop GUI (I tried to do PyQt and then discovered QML with JavaS…

And this is why I'd argue that Python 3 was a big mistake. In exchange for 6 years and counting of freezing and bifurcating the ecosystem, we got a smattering of minor improvements that don't substantially change the developer experience. What could we have had if that effort had instead been focused on things like real performance optimization and native browser support?

Re: Retiring Python as a Teaching Language

#28
post #5

It's with all of this in mind that my recommended language for teaching beginners is now Javascript. I know, I know, it's quirky and sometimes outright weird, but overall it's decent and modern enough. Javascript is a flawed, quirky language, but with the upcoming ES6 and ES7 standards it's going to be a much, much better. I'd call it a tossup comparing it to Python or Ruby. I wouldn't have recommended JS to a beginn…

I hope you at least wait until those standards are thoroughly supported "in the wild" because the wild provides the entire point of choosing Javascript. Even then, the argument that ES6+ will make everything better ignores that those standards layer more stuff on top of a lot of bad old stuff that isn't going away. And the community status quo is bad documentation, messy APIs and things breaking all the time. If I did not HAVE to use this stuff I would happily choose to avoid the frustration.

There is no competition to Javascript for programming browsers, but why should programming education always center on programming browsers? For education in particular, there are a number of languages designed for education and Javascript (even ES6) has never been one of them.

No accounting for taste, I guess.

Re: Retiring Python as a Teaching Language

#29
Funny, I have done a lot of game/graphics related programming using python and panda3d, which is written in c++ and has nice python bindings [0]. Sure, you can't just do "import wheemakegames" but the tools are out there. The same is true for GUI apps. If you want to click on stuff just have them use pyqt or pyside. I think that teaching students about other packages and how software actually works together is very important. Having said that packaging a python program into an executable installer or even just an executable is a pain in the ass ("What sane person DOESN'T have at least one working python interpreter?!?").

0. http://www.panda3d.org/manual/index.php/Main_Page

Re: Retiring Python as a Teaching Language

#30
post #5

It's with all of this in mind that my recommended language for teaching beginners is now Javascript. I know, I know, it's quirky and sometimes outright weird, but overall it's decent and modern enough. Javascript is a flawed, quirky language, but with the upcoming ES6 and ES7 standards it's going to be a much, much better. I'd call it a tossup comparing it to Python or Ruby. I wouldn't have recommended JS to a beginn…

+1 on the interactivity aspect. Not having to go through a bunch of compiler configuration (C/C++ land) to get a basic GUI up and running is a huge plus. And HTML is a lot easier to understand for people with no experience than a bunch of tkInter classes.
Post reply on HN