4 ms·
You listed > async model > GIL > scoping rules > decorators but these are not relevant for a beginner in programming, which is I think what advocates refer
by hiq 6y ago
You listed
> async model
> GIL
> scoping rules
> decorators
but these are not relevant for a beginner in programming, which is I think what advocates refer to.
Python makes it easy to read files, do something with the content and write it back, to print any variable. It runs even if you have syntactic errors in an unused function. A beginner's Python code can be dirty, but I think one reason why it's taught so often is because it's less frustrating to fix runtime bugs than cryptic compilation errors you see in safer languages, although as you said, it's detrimental to the code quality in the long run.
- cwyers 6y agoOkay, but if Python already has all of these things that are considered not relevant to beginners, why assume that these new language features are things beginners will have to deal with, instead of being like the language features they don't?
- hiq 6y agoThe feature in question matters. I don't see how you would fit async / the GIL in a beginner course. But if pattern matching is seen as idiomatic for basic code, then it should and will be introduced to beginners. For instance the switch / case construct is on https://learnxinyminutes.com/docs/java/ https://learnxinyminutes.com/docs/java/ (interestingly not on https://learnxinyminutes.com/docs/c++/ https://learnxinyminutes.com/docs/c++/ !), implying that it's quite basic there.
- bmitc 6y agoI would argue that those things don't even need to be there or so complex, which is why it's weird Python is considered a good beginner's language. It is Python that makes these things complex, not the things themselves. The GIL shouldn't be there in the sense of async and concurrency code being understandable and actually concurrent. The scoping rules should absolutely be explainable to beginners. Decorators are just weird tacked on things. Maybe async is a non-beginners topic, but one can introduce it pretty easily in languages like F# or Elixir or even LabVIEW, so I'm not sure. Plenty of languages make it very easy to read data from a file, process it, and then write it back out. F#, Elixir, Racket, LabVIEW, etc. all come to mind.