4 ms·
I’ll be that guy who says I love Python but it’s been shoved into too many spaces now. It’s been a great tool for me for writing things that require a lot of I/
by ok_dad 4y ago
I’ll be that guy who says I love Python but it’s been shoved into too many spaces now. It’s been a great tool for me for writing things that require a lot of I/O and aren’t CPU bound.
I am even rethinking that now because I was able to write a program in Go with an HTTP API and using JSON as the usual API interchange format in one night (all stdlib too), and it was so easy that I plan to pitch using it for several services we need to rewrite at work that are currently in Python. That would be very similar to what I wrote in a day.
If Python doesn’t fix their packaging, performance, and the massive expansion in the language, I think it’s going to start losing ground to other languages.
- jeremycarter 4y agoSyntactically Python is great. Runtime though, its not. Its fast to code in - that is all.
- jmt_ 4y agoAgreed. I'm past the "it's like writing pseudo-code - so cool!" honeymoon phase and onto the "some sort of static typing is actually pretty useful" as a developer.
- aprdm 4y agoGood thing is that python3 provides typing.
- peterashford 4y agoOptional type hints are not the same at all.
- isitmadeofglass 4y agoNo, its better. You can build the code first, test that it functions as expected, then add types, then compile it. This is miles ahead of having to struggle with getting types correct in C++ before you even have anything resembling a workable solution.
- jmt_ 4y agoI don't disagree but I wish Python had builtin support for runtime type checking. I've thought about switching to Go or Rust for certain projects but Python's rich ecosystem makes it hard for me to switch, so for now I long for runtime type checking without needing an external library (e.g typeguard).
- meadsteve 4y agoVery much agree. It's one thing I really appreciated about how php added type annotations. You didn't need them but once you added them they became a gaurantee.
- aprdm 4y agoYou can configure vscode to fail on typing problems and it will show errors in your editor
- peterashford 4y agoSo that's an IDE feature rather than a language level feature
- isitmadeofglass 4y agoYou can check types at runtime in python. You can even check values at runtime. Heck you can check the weather at runtime if you like. What’s the problem exactly?
- intelVISA 4y agoCan't fault Py as a scripting lang but the lengths people go to kludge it into areas it shouldn't really be (in prod at least) is always a massive red flag for any org.
- eru 4y agoMicrosoft is bankrolling some efforts to improve Python performance. They even hired Guido for that. (Disclosure: I'm a very minor volunteer contributor to that effort. I have a series of pull requests in the works that will improve runtime performance by about 1% across the board. I also have some more specialised improvements to memory.)