4 ms·
I've been recommending Python to the occasional aspirational young programmer. Is it already passé? What would you recommend instead for a starter language? Loo
by thaumaturgy 4y ago
I've been recommending Python to the occasional aspirational young programmer. Is it already passé? What would you recommend instead for a starter language? Looking for beginner-friendliness, widespread use, and longevity.
edit: to be clear, I hope this won't devolve into a language flamewar. I'm sincerely interested in other devs' opinions, and hoping that either Python is still a good recommendation (which seems to be the consensus so far) or that there's a better alternative.
- heavyset_go 4y agoNo, it isn't passe, this developer just has some personal gripes with it that can range from understandable to "you'd complain if we did it any other way" with regard to their question about why type annotations were implemented the way they were.
- mgkimsal 4y agoI have, for the life of me, never understood the 'beginner friendly' argument for python. Java, PHP or JavaScript for 'widespread use and longevity'. None of these are going anywhere, and I think you'd find more resources for beginners to advanced users for those 3. Yes, of course there's others - everyone has their faves. And Python will continue to kick around as well, but I've just never understood the 'beginner friendly' bit.
- baq 4y agoJava the language used to be so simple that it needed significant library usage to accomplish anything at all. It aimed for ‘safe C with classes’ and succeeded… in the enterprise where management was making technical decisions. After feeling the heat from C# it managed to catch up, mostly, to modern realities. Not a good beginner language, despite the simplicity. PHP was not designed at all. It took a decade to make it more than a template processor. The biggest, by far, selling point was ease of deployment: ftp and done. Good if you want to display something in a browser. Learning programming, not so much. Javascript is starting to become a sane language with ES6. It’s an accident of history that became an industry standard due to sheer power of will of browser companies. Tooling complexity in its ecosystem rivals, if not exceeds, that of C++. Recommending js s as a language to learn programming on has been until last couple of years irresponsible. Python was designed to be beginner friendly, it was the next iteration of other beginner-friendly languages that had some academic research done about, you guessed it, beginner friendliness. It is not an accident it’s recommended for newbies! Due to that and a decade of 1) numpy for biological computing 2) django/flask for web services it’s ubiquitous in two very loosely connected domains, giving birth to jupyter and tensor libraries, and here we are. Turns out a batteries-included standard library makes packaging not a priority for too long.
- FlyingAvatar 4y agoI would guess the main reason it gets recommended to beginners is because it's the most prominent language with the most minimalist syntax, so you can read it more closely to a written language. Also, being interpreted, you don't need much (or really any other than the interpreter itself) tooling to start playing around with it. This is true, of course, for lots of other languages. I think also the fact that people do use it for real solutions makes it more appealing to recommend than a "toy" language like Logo or BASIC. (Mentally, I see BASIC as separate than VB. And yes, I am sure some people will comment that real solutions are built in BASIC, but I am sure these days Python dwarfs those in count by a factor of 100, at least.)
- simonw 4y agoIf you want "beginner-friendliness, widespread use, and longevity" then Python remains a fantastic choice.
- justsomehnguy 4y agoIn my experience PowerShell fits well as a toe-dipping language. It allows to solve the menial tasks someone with no programmng experience usually needs to solve, can interact with HTTP/REST-like APIs, sometimes has the modules for a popular solutions, is object oriented, lax on the indentation *smirk*.
- kcartlidge 4y ago> In my experience PowerShell fits well as a toe-dipping language. Ugh. Sorry, I've not really got anything constructive (destructive?) to say in support of that other than (a) in practical terms it isn't a transferrable skill beyond Windows, (b) the Naming-Conventions-OfThings is both awful and verbose, and (c) I've never had a use case where more than a handful (at most) of my fellow devs would be happy to work with it in the future. YMMV and I appreciate this is very much a personal opinion.
- justsomehnguy 4y agoa) thats only for modules designed to interact with Windows features. Sure, Get-ADComputer doesn't work on Linux, but... by default Python doesn't work with a ton of things which are available through the wast library of Python modules. Same deal with PS, you can't interact with Snipe-it or Netbox by deaful... but there are modules for that.[0] Basics works everywhere. In my personal experience I often found myself in a situation where I'm spending a lot of time wrestling with *nix shell (especially finding workarounds for the differences between Debian/Ubuntu and RH/CentOS/Rocky) instead of spending 5 minutes on PS script which would would everywhere, just supply the distro specific paths. b) not a problem in the real life. Come on, you don't sprn you time writing the paths, you just TAB them - same thing with PS, except it works on cmdlet names AND their parameters, out of the box, on any platform. Ubuntu has it now by default (for some supported things), RH-like - not. c) well they probably had a more familiar to them tool on their hands already YMMV, of course, but the thing is what you are being constructive here, with explicitly stating things you don't kno2 or understand. [0] and there are Py modules for that too, but they are not the part of the default install too
- 323 4y agoPython is the number one language in the world right now. Exactly the opposite of passe.
- Ekaros 4y agoIt is not horrible for doing basic things or light weight things. And after they learn those and have few fights. They might be ready to research what to choose for next project.
- heavyset_go 4y agoPython is a good choice for many large projects, as well. Typing has helped a lot when it comes to managing large codebases in Python that would have been a pain to manage using something like Python 2.
- klyrs 4y agoI hate a lot of things about python because I've been using it for almost 20 years, and I know its innards, its history and its trajectory. I want to love Nim or Julia or Typescript, but they just aren't doing it for me. But you can't hate a language as deeply as I do without loving it as long as I have. I don't think this article, or my own opinions, are representative of the community.
- c7DJTLrn 4y agoPython is syntactically simple but that doesn't necessarily make it a good choice for beginners. I've seen students spend hours wrestling the interpreter over whitespace issues.
- pjmlp 4y agoMaybe they shouldn't be using Notepad.
- c7DJTLrn 4y agoerr, they were using IDLE.
- pjmlp 4y agoThen they should have spent some minutes reading documentation on how to use their tooling, https://docs.python.org/3/library/idle.html#automatic-indentation https://docs.python.org/3/library/idle.html#automatic-indent...
- c7DJTLrn 4y agoThe docs you linked say that IDLE can help with indentation, not reindent code for you. This might surprise you, but students don't necessarily know how to preserve indentation or reindent code as they cut/paste around.
- pjmlp 4y ago> See also the indent/dedent region commands on the Format menu. So not even you are reading the documentation? And if IDLE is not good enough for students, Komodo IDE exists for 20 years, VS and VSCode also do a quite good job, PyCharm, as do Emacs and vim. It isn't as if the alternative JavaScript and Go code is being written without adequate tooling.
- Izkata 4y agoI tend towards recommending python just because of that. I used to be a TA in an intro to programming course, and it's unbelievable the mess complete beginners can make when indentation isn't enforced, like in {} delimited languages.
- pjmlp 4y agoPython is quite alright as the new BASIC, keep recomending it.