4 ms·
Python has wonderful set of libraries so it is probably going to stay with us for a while. However, I suspect major takeover by Typescript (despite I like Pytho
by noon-raccoon 4mo ago
Python has wonderful set of libraries so it is probably going to stay with us for a while. However, I suspect major takeover by Typescript (despite I like Python more).
- reuven 4mo agoInteresting -- I still think that Python is an easier onramp than TypeScript for new developers. But given the popularity and depth of JavaScript, and the clear advantages (and popularity) of TypeScript in serious development, that's not a bad prediction.
- jhbadger 4mo agoOne thing that Python has that virtually no (well okay groovy and nim do too) other programming language has is whitespace for blocks rather than visible braces (or even BEGIN/END ala Wirthian languages). That's something much like line numbers in classic BASIC that introduces a roadblock when learners move on from it.
- reuven 4mo agoI don't know if it's that hard for people to go from Python (where whitespace is significant) to languages that use {} and the like. But hey, people only hire me when they want people to learn Python, not when they're moving away from it. :-)
- TheOtherHobbes 4mo agojs is a web scripting language that can be strong-armed into running scripts through a runtime. Python is a general development language that can be used to build servers and web pages, but does a lot more besides. They're not really comparable. Having said that - I wouldn't be surprised if Python drifts towards stronger typing, although it will probably remain optional.
- deleted 4mo ago[deleted]
- samat 4mo agoNowadays a lot of web servers are written in js, for better or worse
- SwiftyBug 4mo agoTo what extent do you see Python drifting toward stronger typing? I ask because after 10 years without touching a single line of Python, I recently worked on a Python code base and I was very positively surprised by the static typing that's available in the language now. Not even necessary to to reach for additional tooling like JS and TS.
- kccqzy 4mo agoHow are you getting static typing without additional tooling?
- SwiftyBug 4mo agoI mean, of course there is tooling involved. But it's part of the language. Unlike TypeScript which is a superset of JS and requires transpilation.
- kccqzy 4mo agoWhat tooling are you thinking of that’s part of the language? I don’t think CPython ships with a type checker, does it? People typically use mypy or pyright and neither or these are part of the language.
- kortex 4mo agoDrifting? I think it's there. basedpyright is awesome and super fast. Our latest services are all CI gated by type checking. Early in my career you'd hit so many dumb errors running your code - NoneType, attribute, value, and type errors. I'd say that's been cut over 95%.
- noon-raccoon 4mo agoFrankly, I prefer Python because I find it more elegant. However, in my industry bubble, I see a clear drift toward TypeScript.
- wongarsu 4mo agoMy money would be on Go and Rust. Most of the major downsides of either language go away if you let the agent write almost all of the code Go might have the advantage because it's easier to read outside the IDE
- reuven 4mo agoI can see Rust (and to some degree, Go) as the modern outputs from AI. My point about Python being Pinyin is that both of these languages have a relatively steep learning curve for someone without programming experience, and that it might be worth learning Python before doing agentic coding in Rust, much as children in China learn Latin characters before they learn characters.
- usernametaken29 4mo agoThe problem with Rust is that, AI aside, the learning curve is steep. Even senior engineers need to wrap their head around Rust for several weeks. You can pick up Go or Java in an afternoon. It’s fast, it mostly makes sense. Unless you do very specific low level things I don’t particularly see Rust becoming the de facto norm for the vast amount of enterprise code
- dist-epoch 4mo agoA big selling point for Python is the large number of native extensions. Rust has a huge advantage here, in fact many popular Python libraries use Rust underneath.
- fpauser 4mo agoMaybe the/a big "selling point" for python is the fact, that many teachers don't know better.
- dist-epoch 4mo agoDoes this also apply to the industry professionals who pushed it to number 1/2?
- prinny_ 4mo agoInteresting. Can you please elaborate more? Is it due to the combination of popular foundation (js) and the addition of strong typing? The runtime environment differences? The ease of integration with other languages / tools?
- herrkanin 4mo agoDon't underestimate the significance of code being runnable in a browser environment.
- noon-raccoon 4mo agoA few points that come to mind: * Most applications run on the web nowadays. With TypeScript, you can write both the front end and the back end. * TypeScript shares many syntactic-sugar ideas with Python, but it is also statically typed. Whether that is good or bad is a hot topic, but it gives you a lot of confidence through compile-time checks. * Running Node for system tasks is as easy as running the Python interpreter. However, Python is still slightly ahead there.
- dwroberts 4mo agoI feel like the moment for typescript taking over has come and gone. It also became way more complicated than necessary and that limits its appeal compared to python (not to say python doesn’t have problems of its own)
- gbuk2013 4mo agoI’m a JS/TS dev (and fan) I don’t think either is a replacement for Python. They are not standalone languages but require some runtime to interact with the world (DOM or Node.js etc) which have limited capabilities for interacting with the system - their focus is network services. It’s not that inaccurate to say that JS is just API for a C++ app. :) Now if .NET was still not so embedded in the Windows ecosystem that would be very interesting to me to jump from TS. As it is I am learning Go instead.
- b40d-48b2-979e 4mo agoThis is a non-sequitur? Python is also not a "standalone language" and requires "some runtime".
- gbuk2013 4mo agoSure but that runtime is much more general purpose - JS runtimes are focused on network apps. For example you can write an app like Calibre in Python and QT and it is much lighter than writing something with JS and Electron. Python is easier to interface with C/C++ libs.
- b40d-48b2-979e 4mo agoThe async loop does not automatically make it "focused on network apps". Most apps I work with in Python also run on an async runtime.
- gbuk2013 4mo agoIt’s not the async loop - it’s interfacing with the system. JS is designed to run in a sandbox and the only way out in say Node.js is to write C++ addons. For example you don’t get to see TCP headers with Node out of the box and you can’t craft packets, whereas you can in Python.
- jim33442 4mo agoYeah, I've thought about this since I do prefer JS as a language... Always thought the main advantage of Python was interaction with C libs. Which is also why CPython was the only serious option for an interpreter, even though things like PyPy were faster.