Hacker News new | past | comments | ask | show | jobs | submit login

How do you do, fellow python compilers?



So many compilers, it sorta reminds me of JS. Could it be that this language too has major flaws? if so why does everyone keep using it only to find out much later that they need to call out to C to do the heavy lifting only to eventually find out again that even that is not fast enough. So they need to compile all the rest of the python parts too.

Seems like a rundabout way to use these lower level language without actually acknowledging that fact. An incredible amount of effort has been wasted making Python a viable language. At least the JS people have the excuse that there was no other option.


The sad state of affairs is that C is just that hard to use for most people, so the roundabout way is pretty much the only way they can manage.


There's a ton of middle ground though. It just didn't catch on as much. Unfortunately, ecosystem is still king.


> why does everyone keep using it only to find out much later that they need to call out to C to do the heavy lifting only to eventually find out again that even that is not fast enough

Because most people/companies cannot plan a program from start to finish, without actually building it. Python is fast to program significantly faster than C/C++. If you are making a prototype, then you need to be fast to allow rapid change.

For most situations, that is good enough. For the 1% where it isn't, you bust out to C. for the 0.1% where that's not good enough, you write that again from scratch using something C-like. (yes, yes, rust exists, hello rustaceans, yes, yes I have heard about your lord and saviour. No, I'm not going to re-write everything in it, not just yet. Yes please do leave a leaflet. )

Having said that, python isn't perfect. I miss static typing, or at least a strict mode.


I think major contributor is the "Python is slow" meme. Sure it is slow when compared to C or something, but most of the time the time you save by implementing in Python massively out weights any performance gains, but since everyone keep saying that "Python is slow" it pushes some people to go and try to make it fast.

Good example of above is this line from you (highlight mine)

>An incredible amount of effort has been wasted making Python a *viable* language.

What does it even mean for a language to be "viable"? Is fast execution the only criteria? There are good reasons why we aren't writing all software in C or Assembly for maximal potential performance.


Sincere question: I wonder what fraction of Python users bump into these limitations often enough for it to be a problem. I do find Python to be more pleasant than C, though I use them in different domains -- desktop and embedded -- so it's not a direct comparison.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: