Live data from Hacker News

Why We Should Teach Python instead of Racket

acbart.github.io

31–40 of 69 posts

Re: Why We Should Teach Python instead of Racket

#31
>>>> Specific, formal survey question (T/F style): “Please Indicate if you like and are comfortable with each of the following languages:”

Java: 93% C/C++: 74% Python: 38% JavaScript: 21% Racket: 7%

This is absolutely hilarious. Students are comfortable with C/C++ and Java the most. I guess they haven't seen segmentation faults and null pointer exceptions enough in production ruining businesses yet.

It is kind of funny how almost all of my peers who studied CS ended up wanting to work on ML languages (F#, OCaml, Haskell, etc.) after spending 10+ years with Java, C, C++ or C#. At the time they were learning Prolog and SML they did not like it much. This survey should be done after some time spent on deploying production ready applications for living and see how it will change.

Re: Why We Should Teach Python instead of Racket

#32
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.

Re: Why We Should Teach Python instead of Racket

#33
post #21
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…

Object oriented programming is an antipattern? Can you explain this? I am not a CS major, but I find using classes quite useful.

I suggest searching google for "problems with object oriented programming". There have been countless discussions, articles and videos.

Examples: https://www.youtube.com/watch?v=QM1iUe6IofM https://medium.com/machine-words/the-rise-and-fall-of-object... https://medium.com/@cscalfani/goodbye-object-oriented-progra...

Re: Why We Should Teach Python instead of Racket

#34
This entire post utterly strains credulity. It has the vibe of a bad Facebook post that your relatives shares that makes you groan.

Halfway through I find myself doubting not merely the authors thesis but wondering if it's meant to poke fun or entertain.

Can statements like

>The hardest thing to capture in this site is the trauma in some students’ eyes.

> I have also seen first-hand the trauma that it has caused students.

possibly be meant seriously?

Was racket the wrong tool to teach programming or did it eat their dog and set fire to their dorm?

I picture Michael Keaton appearing after Geena Davis says c++ c++ c++ saying wait until they get a load of me.

Everything has a certain amount of cognitive overhead. Perceptively python and racket both have fairly low overhead and quick feedback and ought to be in the same ballpark insofar as learning basics.

I wonder if discontent as described derives from dissimilarity with existing material.

A person with some knowledge but not much may be disproportionately dissatisfied with not being able to use such. Speculating that the best students have no problem, the worst students blame the instructor or the materials, the bottom middling who know a little python or Javascript are frustrated that they cannot benefit from existing skills.

Students perception of value of instruction may be a useful metric for the school insofar as attracting students but one questions if the students are the best qualified at the start of their education to access the value of individual components of their education.

Re: Why We Should Teach Python instead of Racket

#35
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…

Performance is largely irrelevant for the first teaching language. You can completely ignore OOP (unlike Java) if you want, although you probably should teach students about it at some point. Python doesn't have "no concept of types".

I have TA'd different intro classes that started with those languages, and Python IMHO makes a way better first language than C or Java. Start with it, introduce other languages and their concepts later. I've heard mixed things about starting with functional languages, but I think it can work too.

Re: Why We Should Teach Python instead of Racket

#36
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…

> There’s no concept of types

Python is strongly typed, and while it doesn't mandate static type checking, it has several AOT static type checkers available.

It's not Haskell, but then neither are most languages that mandate static type checking.

Re: Why We Should Teach Python instead of Racket

#37
post #17

Earlier quoted context omitted.

One of the chief concerns in introductory linguistics programs is introducing students to the great typological diversity of the world's languages. There are a number of different ways in which languages can inflect (or not), structure word order, derive new words from existing vocabulary, etc. Conlangs, however, tend to choose a very limited set of approaches, for example agglutinative inflection is popular because…

Right. And doesn't that apply to programming languages too? Aren't the ways that Python is irregular to support real-world needs (the Zen of Python even says "Practicality beats purity") worth CS students studying?

No, because this is computer science and not software engineering. The best introductory language is the one that allows to express the concepts that are presented in the cleanest way possible. If you want "real-world needs" then drop out and work for a software company. The purpose of universities is not to cater to the needs of industry - to pump out code monkeys.

Re: Why We Should Teach Python instead of Racket

#38

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

There is no reason computer science needs to be steeped in academia. The only reason why it is so popular in the first place is because it is so practical and applied. Easy to profit from. If you worship your ivory towers, feel free to become a mathematician.

Re: Why We Should Teach Python instead of Racket

#39
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…

I disagree, I think python is fine.

Yes, you don't have to complete bonkers OO with multiple inheritance, but in general OO is a win.

Also, python has a pretty good standard library and a pretty elegant module system.

There's also a practical consideration. After you learn python, you will know python. It is a useful language with hooks into just about every endeavor you could do on a computer.

Re: Why We Should Teach Python instead of Racket

#40

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

There is no reason computer science needs to be steeped in academia. The only reason why it is so popular in the first place is because it is so practical and applied. Easy to profit from. If you worship your ivory towers, feel free to become a mathematician.

I think computer science has every reason to be steeped in academia.
Post reply on HN