Python有什麼缺點?
Python seems all the rage these days, and not undeservingly - for it is truly a language with which one almost enjoys being given a new problem to solve. But, as a wise man once said (calling him a wise man only because I've no idea as to who actually said it; not sure whether he was that wise at all), to really know a language one does not only know its syntax, design, etc., advantages but also its drawbacks. No language is perfect, some are just better than others.
So, what would be in your opinion, objective drawbacks of Python.
Note: I'm not asking for a language comparison here (i.e. C# is better than Python because ... yadda yadda yadda) - more of an objective (to some level) opinion which language features are badly designed, whether, what are maybe some you're missing in it and so on. If must use another language as a comparison, but only to illustrate a point which would be hard to elaborate on otherwise (i.e. for ease of understanding)
So, what would be in your opinion, objective drawbacks of Python.
Note: I'm not asking for a language comparison here (i.e. C# is better than Python because ... yadda yadda yadda) - more of an objective (to some level) opinion which language features are badly designed, whether, what are maybe some you're missing in it and so on. If must use another language as a comparison, but only to illustrate a point which would be hard to elaborate on otherwise (i.e. for ease of understanding)
I use Python somewhat regularly, and overall I consider it to be a very good language. Nonetheless, no language is perfect. Here are the drawbacks in order of importance to me personally:
1. It's slow. I mean really, really slow. A lot of times this doesn't matter, but it definitely means you'll need another language for those performance-critical bits.
2. Nested functions kind of suck in that you can't modify variables in the outer scope. Edit: I still use Python 2 due to library support, and this design flaw irritates the heck out of me, but apparently it's fixed in Python 3 due to the nonlocal statement. Can't wait for the libs I use to be ported so this flaw can be sent to the ash heap of history for good.
3. It's missing a few features that can be useful to library/generic code and IMHO are simplicity taken to unhealthy extremes. The most important ones I can think of are user-defined value types (I'm guessing these can be created with metaclass magic, but I've never tried), and ref function parameter.
4. It's far from the metal. Need to write threading primitives or kernel code or something? Good luck.
5. While I don't mind the lack of ability to catch semantic errors upfront as a tradeoff for the dynamism that Python offers, I wish there were a way to catch syntactic errors and silly things like mistyping variable names without having to actually run the code.
The documentation isn't as good as languages like PHP and Java that have strong corporate backings.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-743000/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 公共代理有什麼缺點?
- Python垃圾回收機制是什麼?有哪些優缺點?Python
- 免費代理的缺點有什麼?
- TF簽名是什麼?穩定性怎麼?有什麼優缺點?
- 什麼是CDN邊緣伺服器,有什麼優缺點?伺服器
- 為什麼要前後端分離?有什麼優缺點後端
- Julia有什麼不好地方?缺點是啥?- viralin
- 什麼是閉包?有哪些使用場景?優缺點是什麼?
- 伺服器虛擬化部署是什麼有什麼優缺點伺服器
- Python集合有什麼特點Python
- python列表有什麼特點Python
- NFS服務有什麼優缺點呢?linux入門用什麼書NFSLinux
- 那麼多人選擇Python,它的優缺點有哪些?Python
- 什麼是CN2線路?有哪些優缺點?
- (1)微服務是什麼?它的優缺點有哪些?微服務
- Linux中靜態路由指什麼?優缺點有哪些?Linux路由
- DRBD是什麼意思?優缺點是什麼?
- 與其他系統相比,Linux系統有什麼優點和缺點?Linux
- Python培訓分享:Python有什麼優點?Python
- EventLoop有優點但也有缺點,請說說它的缺點是什麼?OOP
- 混合IT是什麼?基礎設施和優缺點有哪些?
- Linux中lvm分割槽是什麼?LVM優缺點有哪些?LinuxLVM
- Linux中LVM的工作原理是什麼?優缺點有哪些?LinuxLVM
- Python有哪些優缺點,你瞭解嗎?Python
- 舉例說明物件導向程式設計有什麼缺點?物件程式設計
- 開源是什麼意思?開源軟體優缺點有哪些?
- 測試用例編寫有哪些方式?各有什麼優缺點?
- python中物件導向有什麼特點Python物件
- Python能代替shell嗎?有什麼特點?Python
- python語言有什麼特點?python應用領域有哪些?Python
- 執行緒和程式有什麼優缺點?Linux運維學習執行緒Linux運維
- 美團一面:什麼是CAS?有什麼優缺點?我說我只用過AtomicInteger。。。。
- 什麼是python?python有什麼用途?Python
- Python是什麼意思?Python有什麼用?Python
- MySQL Json有哪些缺點MySqlJSON
- iframe有哪些優點和缺點?
- 什麼是閉包,閉包的優缺點?
- 雲主機的優缺點是什麼呢
- 使用ajax輪詢介面有什麼優缺點?