7 ms·
Python has only one really serious drawback for the kind of tool it is and its not remotely its own fault: its not a first class resident on mobile. In a diffe
by college_physics 4y ago
Python has only one really serious drawback for the kind of tool it is and its not remotely its own fault: its not a first class resident on mobile.
In a different universe its sweet easygoing manner would have created enormous value by enabling all sorts of casual programmers to have some control over this most ubiquitus of computing devices.
Alas we dont live in an era where tech aims to empower users.
NB: There are a number of projects that allow some of this (kivy, beeware) but they need to swim hard against the current.
- VectorLock 4y agoPython is weak on front-end web and mobile, but I suppose its impossible to expect Python to be great at everything. For the number of niches it can fill, I think Python is still ahead.
- __MatrixMan__ 4y agoNothing interesting happens on the front end anyway.
- college_physics 4y agomaybe thats precisely because the frontend has turned into a monoculture. having multiple competing stacks with different pedigrees helps innovation. one example I can think of is the erlang/elixir/phoenix/liveview stack that revisits old patterns and gives them new life. who knows, maybe wasm and projects like pyscript will stirr things up
- arcturus17 4y ago> Nothing interesting happens on the front end anyway. That's just like, your opinion, man
- VectorLock 4y agoI know thats a big part of the reason I wish it was accessible natively and frictionless in Python. I'd like to not learn a whole new inferior language to make a decent UI.
- pharmakom 4y agoThe main drawback of Python is the limited set of language features.
- ugh123 4y agoand those are....?
- alch- 4y agoOff the top of my head, it lacks decent support for functional programming (like multi-line lambdas - pretty basic functionality even for a non-functional-oriented language!), properly supported static typing, proper multithreading, decent performance (in the main implementation)...
- VectorLock 4y agoFunctions are first-class objects. If you want a multi-line lambda thats just a function.
- code_runner 4y agoIt’s gross to have a function floating off somewhere that has no true reuse value at all and doesn’t live close to where it is used. I like Python but this is probably my biggest gripe.
- bee_rider 4y agoI mean, it is Python, if you are using it you aren’t aiming to be super-lean, right? Apparently it is possible to delete a function. https://stackoverflow.com/questions/10367414/delete-function https://stackoverflow.com/questions/10367414/delete-function
- saila 4y agoYou can delete references to any object in Python, including functions: >>> def f(): None ... >>> del f but it's pointless to try to manually manage memory in Python in most cases. If you're processing huge amounts of data, there are probably better approaches than using `del` and/or `gc.collect()` to keep memory usage down (like batching and/or using subprocesses). My other comment in this thread is relevant too: https://news.ycombinator.com/item?id=34197904 https://news.ycombinator.com/item?id=34197904
- miohtama 4y agoBack in late 2010, we worked with Python for mobile (Series 60, Android, iOS). For consumer grade applications, the issue is slow startup time due to module imports being dynamic and slow. For scripting use case by a programmer, tools exist in Python. However use cases are rare, often better served by Raspberry Pi and others.
- college_physics 4y ago> the issue is slow startup time due to module imports being dynamic and slow yes that is still the case e.g with kivy based apps (and apk size too, as you need to ship the entire stack). but such issues could be helped if python was to be promoted to "first class citizen". apparently, at least on the android side, the possibility was considered and rejected early on in any case, whether python or something else, what is missing is easy programmability on mobile. current devices feel more suffocating than Microsoft Windows desktops ever were. you can also see it in the open source app collections in f-droid which I would say is on the underwhelming side.