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邊緣伺服器,有什麼優缺點?伺服器
- 為什麼要前後端分離?有什麼優缺點後端
- 什麼是閉包?有哪些使用場景?優缺點是什麼?
- 伺服器虛擬化部署是什麼有什麼優缺點伺服器
- (1)微服務是什麼?它的優缺點有哪些?微服務
- Python集合有什麼特點Python
- python列表有什麼特點Python
- NFS服務有什麼優缺點呢?linux入門用什麼書NFSLinux
- 混合IT是什麼?基礎設施和優缺點有哪些?
- Linux中靜態路由指什麼?優缺點有哪些?Linux路由
- 使用儲存過程做orm有什麼優缺點嗎?儲存過程ORM
- 關於Portal系統:Pluto前途怎麼樣?有什麼優缺點?
- 那麼多人選擇Python,它的優缺點有哪些?Python
- 與其他系統相比,Linux系統有什麼優點和缺點?Linux
- 開源是什麼意思?開源軟體優缺點有哪些?
- Python培訓分享:Python有什麼優點?Python
- Linux中LVM的工作原理是什麼?優缺點有哪些?LinuxLVM
- 為什麼那麼多公司不用 .NET,而選擇 PHP、JSP,是 .NET 有什麼缺點嗎?PHPJS
- Python有哪些優缺點,你瞭解嗎?Python
- Python能代替shell嗎?有什麼特點?Python
- python中物件導向有什麼特點Python物件
- 執行緒和程式有什麼優缺點?Linux運維學習執行緒Linux運維
- Linux中lvm分割槽是什麼?LVM優缺點有哪些?LinuxLVM
- 什麼是python?python有什麼用途?Python
- python語言有什麼特點?python應用領域有哪些?Python
- Python是什麼意思?Python有什麼用?Python
- Python中爬蟲模組有哪些?優缺點介紹!Python爬蟲
- 使用免費http代理IP的缺點是什麼HTTP
- 臺灣伺服器的優缺點是什麼?伺服器
- Redis持久化RDB和AOF優缺點是什麼?Redis持久化
- win10教育版有什麼優缺點_win10教育版有限制嗎Win10
- MySQL Json有哪些缺點MySqlJSON
- 低程式碼有哪些缺點?