Live data from Hacker News

Why We Should Teach Python instead of Racket

acbart.github.io

61–69 of 69 posts

Re: Why We Should Teach Python instead of Racket

#61
post #12

Python is a terrible choice as a first language. Idiomatic python is just glue code that obfuscates the underlying algorithms. Object oriented programming (implementation inheritance) is increasingly regarded as an antipattern, and it encourages that too. The massive performance penalty of writing logic in python vs calling out to external libraries mostly forces developers to program by lego-brick assembling externa…

Python is a great first language, because you can learn the basics in an afternoon, but it is still capable of handling (and actually used for) many real-world tasks from robotics to games to scientific computing. Its low barrier to entry, high reward/effort ratio and quick feedback loop make a good way to recruit potential CS majors! As others have mentioned, Python's slowness can also require you to pick good algor…

I'd say that Python is a good language to learn on your own, but not a good language for teaching computing at higher lever.

Low barrier to entry and quick feedback loop are shared with Racket in this case, and Racket offers much more to learn.

Re: Why We Should Teach Python instead of Racket

#62
post #47

Earlier quoted context omitted.

Interesting point. You are mixing up teaching language with teaching linguistics. Teaching linguistics usually includes phonetics, phonology, morphology, syntax, semantics, pragmatics, discourse, typology and semiotics. Quite similar to teaching computer science. The concepts are independent of the implementation. In this context using Python is bad because it has a very limited set of concepts that worth knowing. Ra…

OK, so you're saying that in universities that teach linguistics (instead of teaching languages), they do in fact strongly prefer to teach in idealized conlangs like Esperanto and avoid working with irregular real-world languages? Can you give me an example of such a university curriculum?

No, I am saying, universities teaching linguistics are teaching concepts. They might teach how some of these concepts are in a particular language, quite often they choose the language of the country they reside in. It would be hard to teach advanced concepts in Python. That is all.

Re: Why We Should Teach Python instead of Racket

#63

We did CS courses in C and C++ 22 years ago. I recently did an MsC program at the same University and most courses are being done using Java. But for assignments teachers allow any programming language - if the task permits - so I did mine in C#. Some colleagues used Java, one guy used Python.

How did they handle grading?

Not the commenter you were replying to, but at my uni it's usually feature based. Basically, you are evaluated on whether your code accomplished the task and not code quality.

I've never heard of people having that choice in intro classes though.

Re: Why We Should Teach Python instead of Racket

#64
post #47

Earlier quoted context omitted.

OK, so you're saying that in universities that teach linguistics (instead of teaching languages), they do in fact strongly prefer to teach in idealized conlangs like Esperanto and avoid working with irregular real-world languages? Can you give me an example of such a university curriculum?

No, I am saying, universities teaching linguistics are teaching concepts. They might teach how some of these concepts are in a particular language, quite often they choose the language of the country they reside in. It would be hard to teach advanced concepts in Python. That is all.

What advanced concepts are hard to teach in Python?

Also, do you generally teach advanced concepts in an introductory CS class?

Re: Why We Should Teach Python instead of Racket

#65
post #12

Python is a terrible choice as a first language. Idiomatic python is just glue code that obfuscates the underlying algorithms. Object oriented programming (implementation inheritance) is increasingly regarded as an antipattern, and it encourages that too. The massive performance penalty of writing logic in python vs calling out to external libraries mostly forces developers to program by lego-brick assembling externa…

[deleted]

Re: Why We Should Teach Python instead of Racket

#66
post #60

Earlier quoted context omitted.

> At my school the Programming Languages core curriculum all used Racket. A good percentage of students funneled into at least the first PL-core class as part of their requirements. The class was very popular. Although the article didn't cover it, I think it's important that in the industry, students will be able to find a job/internship that uses Python more than Racket. If both languages achieve the goal of introdu…

The question is "will teaching python actually benefit students more"? Having learned Python well before any of the Lisps, today I find it a cumbersome language that doesn't really offer anything above others, and while useful, in an academic setting I'd relegate it to a secondary status of language specific to certain courses that use tooling related to it. I'd probably forgo teaching it at that, as the experience o…

> The question is "will teaching python actually benefit students more"?

Is there an argument against it? I ask in genuine curiosity. I am aware that it is not statically-typed and abstract away some of the important concepts in computer science.

What language do you think is more suited? Do keep in mind some of the intro CS classes are also used to warm up non-CS majors to what CS looks like.

The biggest advantage I think it offers is the lowering of barrier to entry. It ignites excitement and removes obstacles to start understanding cs logic so as to say.

Re: Why We Should Teach Python instead of Racket

#67

Earlier quoted context omitted.

> At my school the Programming Languages core curriculum all used Racket. A good percentage of students funneled into at least the first PL-core class as part of their requirements. The class was very popular. Although the article didn't cover it, I think it's important that in the industry, students will be able to find a job/internship that uses Python more than Racket. If both languages achieve the goal of introdu…

Python is definitely more real-world practical. Most students will go on to learn it in future classes anyways though. An Intro class is better off preparing a conceptual foundation that will serve students across many languages and paradigms.

> An Intro class is better off preparing a conceptual foundation that will serve students across many languages and paradigms.

Is there any issue with Python that is against being usable for giving a conceptual foundation? (I understand that it is dynamically typed and abstract away a lot of things in CS) but all of them could be resolved later.

Re: Why We Should Teach Python instead of Racket

#68
post #64

Earlier quoted context omitted.

No, I am saying, universities teaching linguistics are teaching concepts. They might teach how some of these concepts are in a particular language, quite often they choose the language of the country they reside in. It would be hard to teach advanced concepts in Python. That is all.

What advanced concepts are hard to teach in Python? Also, do you generally teach advanced concepts in an introductory CS class?

> Also, do you generally teach advanced concepts in an introductory CS class?

This is also what I struggled to understand with other comments. An introductory CS class's purpose to introduce, warmup and invite students (most often w/ no background) to the world of CS. This means low barrier of entry. (which Python is well suited for).

Yes, there are other languages that offer more features and more explicitly but the point of intro CS classes is to spark the curiosity with a great feedback loop, while eliminating obstacles to learn.

Re: Why We Should Teach Python instead of Racket

#69
post #11

Earlier quoted context omitted.

Did you read the linked article? It is a pretty thorough explanation along with surveys of students. Only 22% liked racket!

So most people who know almost nothing about programming hate Racket. Can't say I find that compelling.

But they prefer Python.

I think we need to note that the specific population you are referring to is directly the ones who are being affected. It might also be a good idea to consider their input.

Post reply on HN