Hacker News new | ask | show | jobs
by paxys 2025 days ago
The best language for a startup is one the founders know the best. Every other discussion will at best make a 1% difference.
9 comments

Really depends on what the business is doing.

Chewing through TBs of data every hour? Probably not a good idea to use Ruby.

Doing a bunch of really heavy math? Probably not a good idea to choose PHP.

Doing a SaaS service? C++ probably isn't a good choice.

There are some really good general purpose languages that can fit most circumstances (Java, .Net languages, Go). However, I'd be careful to say that you could apply them everywhere.

I would mention that you're not bound to a single language so writing the guts of the business logic in something like PHP, Ruby or server-side node might be fine - you'd just hook up the performance sensitive bits up to a library written in a compiled language.

In fact I think there are certain organizational benefits to partitioning your language use by skills required to maintain that section of code. When you're a startup there's no benefit at all, but as companies grow you can use that to smoothly transition into separate teams with different expectations around testing and feature flexibility.

I hate to be "that guy" but I see no reason not to use PHP for all three of those things.

PHP is faster than Ruby. [1]

PHP from a local script does math just fine. It's the round trip of the request to a PHP server and back that you're associating with poor language performance. In a local scripting environment PHP7 is considerably faster than Python3. [2]

PHP is an extremely popular language as the backend for SaaS, and arguably one of the oldest and most successful. [3]

[1] https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

[2] https://blog.famzah.net/2016/02/09/cpp-vs-python-vs-perl-vs-...

[3] https://insights.stackoverflow.com/survey/2020#most-popular-...

> PHP is faster than Ruby.

It's not helpful to be faster than the language that the parent implied wasn't fast enough.

I think the parent's point was that if the startup's raison d'etre involves "chew[ing] through TBs of data every hour", then choosing a language that can do that 10x faster than another might have a tremendous impact on cost and so the company's value. It might be the difference between successful or not.

More generally, "it depends".

> PHP from a local script does math just fine

It depends on the definition of "just fine" really, not to be argumentative. I've written quite a few algorithms processing big numbers (e.g. numbers with digits in the megabytes) and PHP struggles, where other languages like GO are several times faster and often far more easy to parallelise whereas with PHP if I want to try and use the multiple cores my CPU has, I need to look into pthreads or worse, write worker scripts that I execute with backticks or curl, it's clunky for that use-case. I wouldn't even know where to start thinking about how to run my algorithms in the GPU with PHP.

I say this as primarily a PHP developer in my paid profession, and PHP is my go-to for any kind of web development or if I want to prototype an idea - it's a very expressive and intuitive language but there are always use-cases that any language is decidedly unsuited to, even if it's "technically" capable. I wouldn't build a website in native C, even though I know it's "technically" possible for example.

Well, if you have to chew through TBs of data every hour, don't use PHP i think? Unless you're not in a competitive business and you can pretty much throw money at the data?

I think to OC is not well formulated: If you're selling a web app or web SAAS, any language the founders know best is the best. Any other stuff, it is not always the case (but it might be!)

"PHP from a local script does math just fine"

I suspect they meant the kind of heavy math that the PHP 8.x JIT is trying to improve performance for.

Close I think - the best language to use is the one you will have the easiest time hiring good talent for. If you found a startup and all really love and are fluent in COBOL that's great but... good luck when it comes time to hire another employee.
If you have a good product new engineers will learn whatever language it is in. This very article is a perfect example. I'm sure Slack isn't hiring kids out of college with extensive PHP experience.
Php is pretty easy to pick up. We have way to many languages (Java ,Perl, php and python)

A lot of interns end up using php(symfony). If they know Perl or Java they can pretty much jump right in. Python they take a little bit though not much more.

This is strange to me because I’ve taken and succeeded at two positions now where I didn’t know the language going in.
I just wanted to clarify that I specifically called out how easy it is to hire for. A lot of developers are pretty quick when it comes to adapting to a new language and there are virtues that lean in favor of a language being easy to pickup: sharing a paradigm with popular language, sharing conventions with popular languages and good documentation.

I have yet to work a day job in Rust, but I've worked in Java, C++ and Go so I'd be quite confident applying to a Rust position as long as it wasn't specifically security focused... I would be less confident in how quickly I could pickup Prolog - I think my brain works well for the nuances of the language but I'm less certain.

Yeah, this is why I’ve concentrated on learning different kinds of languages in my free time, rather than learning the latest thing: if I know Python, Ruby is relatively easy to learn but Haskell is more difficult. So, it’s worth my time to learn Haskell rather than Ruby.
COBOL.. lol so spoiled. It's machine code or gtfo! /s
That's making a bold assumption you get as far as hiring.
I espoused this sort of rhetoric until I worked at a PHP shop. Every other discussion was about problems posed by the shortcomings of the language, crossed with mistakes made by past staff. It's so easy to make assumptions about "good actors" and "reasonable developers" that just fly out the window with a team that picks PHP and/or doesn't know much else.
I've worked at PHP shops - working on a PHP project for a consultancy right now - and there's 0 issues about 'shortcomings of the language'.

"past mistakes" are almost inevitable problems - I've been on both sides of this - creating things which likely caused someone else problems (learning to be better at tests and docs) - and inheriting problems created by someone see ( learning to demand better tests and docs from others when possible).

"past mistakes" have little to do with the language. Recently worked with a large Java codebase spanning back more than a decade. There's plenty of mistakes that have been made. And... there's plenty of 'language shortcomings' around Java too (go back to Java from 15 years ago, lots of shortcomings).

I was on a team that picked node for a project; the whole thing failed. Should I blame it on the language, or the people who made bad choices?

Perhaps the issue is mostly around people/teams that either aren't very good or more to the point don't have a structure in place to guide them and help them get better.

As I read this I'm upgrading an old Python 2.4 app to 3.8. It isn't just PHP.
Can you elaborate on the failed node project?
Probably not much of interest. Small team of... 4-6 had mix of experience with php, java and .net (min 8-10 years of each, fwir). Someone wanted to learn node (of course... always the best reason to choose a star), and pushed that on others. I gave up fighting that. Then we needed to "micro service" the node code because... well... you know... we have to be on AWS and lambda because... scale. Funnily enough, 'testing' and 'testability' never seemed to enter in to the decision making equation.
It depends on a lot of factors. I worked at a startup that used PHP and the initial code quality of Product A was godawful because some early hires didn't know how to properly structure their code. Over the next few years, as staff turned over, we were able to clean it up considerably, add a lot of good OO practices, and get to a point where new developers who didn't even have PHP experience could be very productive very quickly.

When we started a Product B about nine months into my time there, the new team wrote new, well-designed code from scratch, and was also very productive very quickly.

PHP lets you easily shoot yourself in the foot, but it also gives you all the tools you need to leave your feet in very good condition, and it's not difficult to do that either.

That's true, I've made amazing things with PHP, but as soon as you throw some more people on the project, especially people who pine for their JS or Ruby and don't want to accept the PHP way of doing things, you get a shitshow of epic proportions.
The best language has an appropriate ecosystem as well - everybody hates PHP, but it's damn easy to plug in payments and <insert hot startup widget>.
Not everybody. And yes, PHP ecosystem, and more specifically, Laravel's ecosystem, is incredibly rich and vibrant.
No, really no, as someone who has worked on code bases where people followed the path of least resistance (PHP in this case) things turned into a giant mess of human suffering. Pick a language that has tooling for what you want to achieve otherwise everyone reinvents it or just makes a mess.
I’ve found giant messes of human suffering even where the tooling chosen was relatively excellent for the problem at hand. The part not being considered is that some problems are hard to solve and developers will make a mess even with the right tools. Programming isn’t easy, but especially in uncharted territory. I think that’s why choosing tools you at least know has merits.

I spent a lot of my career consulting as a mess cleaner, more or less, and even very smart people end up making a mess sometimes. Time constraints, shifting goal posts, all of it.

I’d say the worst thing I ever see, regardless of tools, is premature optimization getting in the way of everything else.

If premature optimization getting in the way is the norm for the projects you helped then I'm afraid that the people who crated them before that might not be as smart as you imply.

A "smart" and/or a "senior" programmer knows not to optimize prematurely.

But maybe I latched only on this one sentence and missed your point. Sorry if that's the case.

Honestly I think even junior developers know better, but we all make bad calls sometime and maybe worst of all, requirements can change and sabotage our best efforts.
I think you're going to far. Good luck writing a mobile app in ruby (as one example).
I often hear engineers rave about lisp. Is that really such a superior language?
No, its not, but it is a fun language. I'd take a lisp job over anything if i found one. Not because it is the best language (it is not the best at anything, except maybe prototyping), but because it is fun, and interesting to work with it.
Sounds fun yeah.. Really should start to learn to program. Got a background in pure math but for some illogical reason I feel kind of intimidated by programming.
Superior at what?

Meta-programming? Yes. Object-oriented programming? Meh. CLOS is nice, but not vastly superior to anything else. Something else? Depends on what that something is.

It's interesting.. all these different languages. Wonder if at some point in the future, you'd just have 1 language. (not an engineer so idk if that's possible/practical)
at best 1% and most of the time -50%
Or the language of any libraries that are useful to build on