Live data from Hacker News

Retiring Python as a Teaching Language

prog21.dadgum.com

171–180 of 238 posts

Re: Retiring Python as a Teaching Language

#171
post #127

When I took an introduction to Computer Science in college, it was taught in Racket. Over winter break, I then learned Python, and I was baffled -- why would any curriculum not start with Python? Python was easy, expressive, and allowed the user to get lots done with little effort. It was great at motivating programming by showing its use and power. It seemed like an ideal introductory language. Over the last few yea…

> A language like Racket is great for teaching because it lends itself to exploring so many core concepts: complexity of algorithms, functional programming techniques, recursion, data structures, etc. ... >I don't really think Python is very good for illustrating either the theoretical or the systems-level CS concepts. It's a nice language for motivating programming and showing off how much you can do with little ser…

Racket is a descendant of Scheme, and shares its roots as a great playground for fundamental functional programming concepts, while also allowing for impure approaches as well, making it a great chance to compare and contrast styles. It's also tail-call optimized just as Scheme is, so recursion is generally safe.

The documentation is also almost obscenely robust, the teaching languages provide a great sandbox for easing into various concepts, and the learning material in How to Design Programs is more or less a complete first-year zero-programming-required CS text.

Re: Retiring Python as a Teaching Language

#172

Earlier quoted context omitted.

> Thus, I don't really think that learning Python offers solid programming foundations. I agree. But there is a huge class of people that this argument tends to miss - all the people who learn programming as a tool and not a way of life, like scientists or engineers from other departments. For those, it's ideal to learn one language, and it's OK if they don't completely understand CS. For them it's better to know a l…

Yes, that's a good point. Some people might not actually need to cultivate a deep understanding of CS -- they just need a tool to get the job done. Not everyone who uses a hammer needs to take carpentry lessons. In that sense, Python can be a very appropriate choice.

> Some people might not actually need to cultivate a deep understanding of CS

Most people :)

Re: Retiring Python as a Teaching Language

#173
It's a fair point that the article makes. However, I've started out about 1.5 year ago with a programming group for kids in high school, and my choice was Python. I have since not regretted this decision because of one factor: fun. I could have gone with a weekly lecture on all sorts of theoretical things will learn again if (or when) they start at university.

Instead, I wrote a wrapper around OpenGL that provided some functions like "drawRectangle()" or "drawImage()", and they have used it to build all sorts of things. Additionally, they are constantly wanting to try other stuff. I don't think they would have done this if they didn't enjoy the process of writing code.

Re: Retiring Python as a Teaching Language

#175
post #96
post #80

Earlier quoted context omitted.

>...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... Couldn't agree more. Javascript is one of those things that I wish would just go the hell away and be replaced by something that isn't awful.

What we need is some kind of jvm-like VM binary standard that several languages can compile to. Right now that's simply JavaScript, though, but it's not very good for this purpose.

LLVM.

Re: Retiring Python as a Teaching Language

#176

My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For example Python doesn't have real lambdas, on the other hand it has named parameters. The only reason to use Python that I can think of is maybe SciPy. I made me sad to witness Python gaining so much in popularity as a beginner language in the last year.

I'm curious about this sentiment about python lambdas. What about them is not real?

Re: Retiring Python as a Teaching Language

#177

My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For example Python doesn't have real lambdas, on the other hand it has named parameters. The only reason to use Python that I can think of is maybe SciPy. I made me sad to witness Python gaining so much in popularity as a beginner language in the last year.

I'm curious about this sentiment about python lambdas. What about them is not real?

It's been a while, but doesn't it have restrictions, like you can only use it for one liners?

Edit: found this via Google - "lambda functions can not contain commands, and they can not contain more than one expression"

Re: Retiring Python as a Teaching Language

#178
For getting people into programming with graphics quickly: Processing (http://processing.org/). Since Processing is a thin wrapper around Java, the programming concepts transfer easily. Processing also has a Python mode, and there's Processing.js for the JavaScript fans. If you're a Racket/Scheme type person, ClojureScript might be an option, with Quil for doing Processing-type graphics.

Re: Retiring Python as a Teaching Language

#179

Earlier quoted context omitted.

I'm curious about this sentiment about python lambdas. What about them is not real?

It's been a while, but doesn't it have restrictions, like you can only use it for one liners? Edit: found this via Google - "lambda functions can not contain commands, and they can not contain more than one expression"

> and they can not contain more than one expression

I don't believe that is different from e.g. scheme. Ideally, a lambda expression would look like a normal function body, but I definitely wouldn't discount them as "not real" on this basis.

Re: Retiring Python as a Teaching Language

#180

When I took an introduction to Computer Science in college, it was taught in Racket. Over winter break, I then learned Python, and I was baffled -- why would any curriculum not start with Python? Python was easy, expressive, and allowed the user to get lots done with little effort. It was great at motivating programming by showing its use and power. It seemed like an ideal introductory language. Over the last few yea…

Home computers used to boot to a BASIC interpreter. To do anything you needed to use a little bit of BASIC.

Looking at HN threads we see many people who claim this one thing created very many programmers.

But back when it was happening we had teachers giving remedial classes to force BASIC users to "unlearn" bad habits. (There's probably a "BASIC considered harmful" somewhere).

What language would you recommend for 8 year olds?

Post reply on HN