Is there a critique of the use of Python for intro programming that a layperson (i.e, specifically not a PL person) can appreciate?
Either from a CSEd perspective, an industry perspective, or a technical perspective that’s somewhat self-contained?
@neeldhara
There was a lengthy discussion on this topic on my LinkedIn status early this year. I think you too commented. That thread has been a good reference material for me :-)
@MarkHolum
Hmm. I am generally aware of what you mean I think, but am looking for a primer on specific traps, how likely they are to occur in practice, and what alternatives resolve these concerns and share some of the pros that make Python a popular choice.
+
@neeldhara
It only provides one view of what programming is. To really understand/appreciate programming you need to view it from several different points.
Python doesn't have the necessary context to provide the other views.
@jlouis666
Thanks 👍
What kind of other views are you alluding to*? Also, what alternative provides these contexts, and can they be suitably illustrated within the span of a 30-hour introduction?
*Apologies for the ignorance!
@neeldhara
Why? Do we look for critiques of calculus as a foundation/non-foundation for math for laypeople to understand? That's not usually the target audience of any such critique.
@ShriramKMurthi
Well, in this case it's a selfish request: I anticipate that I'll be teaching intro programming in python (mercifully not imminent, but plausibly in the future) + I am said lay person, so... just wanted to be aware of the major red flags, I guess?
@neeldhara
It depends on what you are preparing the students for.
If for data science, e.g., then python is great.
If as part of an undergraduate degree in computer science, then its in fashion to use a language designed for teaching computer programming and computational thinking.
@neeldhara
Pyret folk resist this tide, without attempting the task beyond their strength of shutting the door to it
they end by teaching Python, so they can start with something else, they just show that the students come out with more skill in Python when they start outside of it
yes?
@neeldhara
I feel that using python, we can’t really appreciate how different data structures are stored and operate at the memory level. Arrays/stacks/queues all end up being a python list. This might get confusing if someone is being introduced to all these.
@neeldhara
C helps one appreciate memory management, python abstracts out and hurt later in life.
Also, clear separation between compiling and execution stage is not very evident in Python.
@neeldhara
Python is like teaching someone to cook, giving them easy to make home recipes one at a time, with a lot of pre-processed ingredients. Other PLs insisit on or enforce, a method to the madness, that one may acquire at a culinary school. A gateway drug, if you will.
@neeldhara
In my experience, students can have issues with understanding typing, since Python has dynamic types. When using APIs, a related concern is what (type of) data to put into params and what type you get out. I’ve seen errors emerge from type mismatches
@neeldhara
It very slow!
Python is very easy to code but it comes with the cost of increased computation time.
A simple time benchmarking with any compiler language would be a good enough critique.
@neeldhara
I think only critique against python would be it doesn't exposes any low level constructs , but if that is not the intend and all one wants to focus on is fundamental programming constructs and using the same. It's a good intro language.
@neeldhara
Pros: low barrier to entry, large community, availability to libraries, Can learn programming without getting bogged down in language syntax issues
Cons: Widely used only in some domains like ML, annoying sensitivity to tabs/spaces
1/ Many will tell you why Python is great for teaching coding, so I'll tell you ways it's not.
State is a bad default. It should be legal but safe & rare. The arc of programming is long and bends towards immutability. Its early use creates messes (eg, "a variable is a box".) ↵