5 ms·
> - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace? Good bait. I'll take it. - dynamic, wea
by AceJohnny2 4y ago
> - it’s believed to be beginner friendly compared to other languages. I’m not really sure why - maybe the whitespace?
Good bait. I'll take it.
- dynamic, weak (really "duck") typing, meaning users don't have to worry about conversion between things. Want to print() a dictionary of whatever? Sure!
- no semicolons to terminate a statement. End of line, that's it
- rich standard library, so you can actually get going on things without having to go on a quest to find the right library for your thing. JSON? It's right there. argument parsing? argparse. Http? http.client works...
- also yeah the "pseudocode" thing. Python is light on extraneous syntax.
Now eliti^H^H^H advanced programmers will frown on many of these same things that make it beginner-friendly...
Dynamic typing means that complex designs have to be careful with their APIs, lest you can get tangled up in deep type errors if you're not careful (I particularly hate the "mix-in" pattern). No semicolons mean, uh, long statements need to escaped? The standard library is "where lib go to die" because they can't evolve as much. "Significant whitespace!? What is this, COBOL!?!11"
- pharmakom 4y agoStatic typing had a tighter feedback loop - you don't even need to run the code to see you made a (type) error. Ability to do structural printing of arbitrary structures is not restricted to dynamically typed languages. However, I actually think a good beginner language could be dynamic or static.