search
HomeBackend DevelopmentPython Tutorial为什么知乎没有选择 Ruby, Java 等现在流行的语言而用了 Python? 加上 Twitter 也从 Ruby on Rails 迁到 Java,这是否说明还是成熟的技术靠谱?

在架构设计完善的前提下,ruby,java,python,php,asp.net之间的编码时间差异应该不大吧。

回复内容:

作为Quora的模仿者,从开发的快捷性出发,最大可能的借鉴Quora的技术是必要的。而Quora用的正是python。

Quora创始人@Charlie Cheever 和 @Adam D'Angelo 针对「 Quora为什么选择python?」 的回答,概括以下几点:

  • 出于对python语言的熟悉 (这是摒弃Ruby的原因)

  • python自身的优势
    • A bunch of pretty good frameworks for Python with good debuggers and reloaders are available.
    • Python data structures map well to JavaScript data structures so marshaling data between the browser and the server is straightforward and easy.
    • Python code tends to be very readable
    • lots of other libraries (like custom mail servers, task queues, etc) are written in Python

  • 为什么不用java?
    • For a lot of little reasons, Java programs end up being longer and more painful to write than the equivalent Python programs. It's also harder to interoperate with non-Java stuff.


Note:「Why did Quora choose Python for its development?」
quora.com/Quora-Infrast Python和Java之间的选择是基于开发效率,Python和Ruby的之间的选择是基于个人习惯喜好。
Ruby目前主要还是web开发,Python在Web开发,系统管理,桌面应用开发等方面都有不错表现。 首先,不论是ruby、python还是Java,都是成熟的技术,历史长短稍有差别而已。
选择不同的技术当然是根据不同的需求侧重,像Twitter这种网站,性能肯定是第一位的,选择静态语言当然比动态语言性能上更好,Java在性能调优上面有更多的方法和经验,还有附加的各种成熟的软件来实现一些列功能需求,这也是ruby、python所不具备的。这里有一篇Twitter后台软件栈分析Twitter研发人员John Oskasson分析Twitter后台软件栈,可以说明问题。
如果是做功能上比较简单、性能上要求又没有那么高的应用(主要是web),ruby或者python都是很不错的选择,至少从开发效率上不逊色于Java。(例如最简单的,ruby+sinatra,不需要ror,就可以做出一个优秀的web,比起Java,省去了很多coding之外的精力) 不光知乎,其实豆瓣也是用python写的。工作原因学过一段时间python,这门语言小而酷的气质才正好符合知乎,豆瓣这类小众社区嘛。

假如你要去露营,你是愿意带上一把小而酷的瑞士军刀,还是背上一个箱子,分门别类的带上所有户外装备呢。java这个庞大的箱子,还是留给电商和企业应用吧。 语言真的不重要,facebook用PHP是因为最早的版本就是基于PHP,facebok招人的时候考的是算法(C++,java,python……任选)而不是语言特性,因为语言是可以短时间内学会的。 快速原型语言之间的竞争,不要扯上java。
创业者选择快速原型语言,类似于ppt,axure的加强版本。
java/scala是成功者的语言。
阿里巴巴淘宝京东一号店facebooktwitter都懂的。
团队的路径依赖是很重要的,看你的团队精通什么,有时候是最重要的决定因素。
下面的文章记录了某个网站选择api前的一个大比拼,scala各方面遥遥领先,当然他们团队的选择还是python因为他们团队大多数程序员熟悉python。
编程语言API性能大比拼-CSDN.NET
scala为什么这么强的原因?
scala就是多线程版本的nodejs,即能够异步通信,语言方面有静态语言的优点-执行效率比script语言高,然后多线程又能够利用多核cpu。
其实java本身也有异步解决方案,spring reactor,netty等等框架都是很优秀的。
在金融交易所有个著名的LMAX框架,在LMAX外汇交易所,每秒钟单线程处理500万个交易。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Python and Time: Making the Most of Your Study TimePython and Time: Making the Most of Your Study TimeApr 14, 2025 am 12:02 AM

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python: Games, GUIs, and MorePython: Games, GUIs, and MoreApr 13, 2025 am 12:14 AM

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python vs. C  : Applications and Use Cases ComparedPython vs. C : Applications and Use Cases ComparedApr 12, 2025 am 12:01 AM

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

The 2-Hour Python Plan: A Realistic ApproachThe 2-Hour Python Plan: A Realistic ApproachApr 11, 2025 am 12:04 AM

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python: Exploring Its Primary ApplicationsPython: Exploring Its Primary ApplicationsApr 10, 2025 am 09:41 AM

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

How Much Python Can You Learn in 2 Hours?How Much Python Can You Learn in 2 Hours?Apr 09, 2025 pm 04:33 PM

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics in project and problem-driven methods within 10 hours?How to teach computer novice programming basics in project and problem-driven methods within 10 hours?Apr 02, 2025 am 07:18 AM

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

How to avoid being detected by the browser when using Fiddler Everywhere for man-in-the-middle reading?How to avoid being detected by the browser when using Fiddler Everywhere for man-in-the-middle reading?Apr 02, 2025 am 07:15 AM

How to avoid being detected when using FiddlerEverywhere for man-in-the-middle readings When you use FiddlerEverywhere...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment