TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Would you use Python as the main lang in a potentially large project?

22 pointsby chuckusover 8 years ago
tl;dr Would you advocate for using Python as the main language in a <i>potentially</i> large-scale project and long running standalone project (not a library)? Such as if you are a startup aiming to build a sustainable SaaS that becomes your full time occupation, or for enterprise projects?<p>I&#x27;ve been using Python for over 4 years from writing web applications for enterprise to startups in Django and Flask, and to RF test frameworks leveraging GNURadio. Python was a suitable choice for many problems I have encountered as because the ecosystem is extremely broad and it is very easy to get started, not just because the language is simple, but because of the popular &quot;battery-included&quot; frameworks. This means I can deliver value must faster from the beginning.<p>But having worked in a company which develops many different production systems developed over a period of 10 years, some running on platforms such as Debian etch, I can&#x27;t help to think that had an enterprise language and ecosystem such as Java or .NET been chosen, maintenance and new features would have been significantly easier, because you hit performance issues much later and understanding legacy code bases are easier even if poorly written because of the static typing, and migration between different runtime versions is first-class.<p>I see Python (or similarly, Ruby) being used at large-scale at consumer-facing businesses such as Reddit, Digg, Uber, Dropbox, etc. but many eventually integrate to a JVM based language into their production system.<p>Would you advocate for using Python as the main language in a potentially large-scale project and long running standalone project? For people who have had the experience, it is worth using Python at the beginning and bearing the cost of adding another language and ecosystem in the mix when to support&#x2F;replace Python when you hit scaling issues?

9 comments

bjourneover 8 years ago
&gt; Python as the main language in a potentially large-scale project<p>This is the flaw in your thinking, the word <i>Potentially</i>. Good engineering means you worry about <i>actual</i> problems and not potential problems (within reason ofc). Your actual problem is that you haven&#x27;t written the web application, so you do that first. For doing that, Python is an excellent choice.<p>&quot;But what about web-scale?&quot; Well, chances are your product will fail for some reason and never become successful therefore thinking about scaling problems now is a waste of time. In my experience, scaling problems comes much later than most people think. I&#x27;ve worked on an interactive site in Django that served 60k visitors per day without problems. It was the database that gave us the most performance problems not Python.
评论 #13242774 未加载
评论 #13235375 未加载
评论 #13235359 未加载
solomatovover 8 years ago
The main advantage of Python for you is that you know the language and the libraries, and when you start something new, it&#x27;s critical that you work on the project, not on learning a new technology.<p>The main advantage of JVM and CLR for large scale development is support for static types. But, Python has a standard for type annotations (<a href="https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0484&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.python.org&#x2F;dev&#x2F;peps&#x2F;pep-0484&#x2F;</a>) which allow you to have all the language services which are available for static languages (refactoring, completion, etc) available for the Python. Not all libraries have these annotations, but you can provide it yourself, or separate code with annotations from code without annotations.<p>You should also take into account that JVM, and CLR have much better runtime performance than Python, almost on par with C++, so you should think about this if it&#x27;s important for your app to use resources as efficiently as possible, but typically it&#x27;s not as important for SaaS projects.
评论 #13234701 未加载
was_boringover 8 years ago
What is large scale? Does it just mean lines of code? I&#x27;m in charge of a Python app that has about 75,000 lines (not including comments, blank lines, imports, generated code or tests), and been doing it for 4 years.<p>Would I recommend python for something the size I do now? No. I would recommend any other language that has strongly enforces types and compile time checks (like Java). They add an extra layer of safety on unit tests. I have dreams of rewrites that are in C# or Java.<p>Just today I fixed 2 bugs because of unexpected types being used.
itamarstover 8 years ago
Scaling is highly dependent on what you&#x27;re building. For many web applications the app server isn&#x27;t really the bottleneck, it&#x27;s the database; switching to JVM won&#x27;t help with that.<p>For other applications Python is way too slow... although PyPy helps a lot.<p>As for things like static typing and maintainability, it&#x27;s certainly possible to do with Python. You also have the power to write horrible unmaintainable code. Unit testing tends to be much more more important in Python. And you can add static typing to Python these days, via external tooling.<p>Some ideas and tools for building long-term maintainable Python, originally written as guide for Java developers: <a href="https:&#x2F;&#x2F;codewithoutrules.com&#x2F;2016&#x2F;10&#x2F;30&#x2F;python-for-java-developers&#x2F;" rel="nofollow">https:&#x2F;&#x2F;codewithoutrules.com&#x2F;2016&#x2F;10&#x2F;30&#x2F;python-for-java-deve...</a>
usgroupover 8 years ago
JVM is fast and supports productive languages (including Jython) which can easily interop without service abstractions. You leave more options on the table.<p>But like others have said, it&#x27;s tempting and typical for developers to obsess about details that at worse will be a good problem to have (... like having to super scale). Worth making sure you&#x27;re not one of them.
iurisilvioover 8 years ago
Yes. Use what you already know and make your project fast.<p>Today, after some large projects, I miss strong typing but not enough to change everything. You need more tests, but I can live with it.<p>We integrated with a large retailer in a complex project with only two developers and I think Python was the reason to it. Too many open source things already done and fast iterations.
codegeekover 8 years ago
&quot;startup aiming to build a sustainable SaaS &quot;<p>This is the key piece of information based on which I will give you my advice. If you know Python and use it already, then go build it in Python.<p>If you do grow to that level of scale, python will be the least of your worries. You will figure it out then. Just build in python and release the damn kraken.
评论 #13242054 未加载
CC_ingover 8 years ago
I&#x27;ve the same problem, but instead of python is ruby(with rails) vs python&#x2F;node.js(that perform a better than ruby)
评论 #13234448 未加载
sontekover 8 years ago
Yes.