Ask HN: Does it really matter which language you use to write code? Pros and Cons

10 points by lookupmobile ↗ HN

10 comments

[ 3.3 ms ] story [ 32.3 ms ] thread
Yes. each problem will have a different manner in which you might approach it in differing languages. Making it either easier or harder and more or less productive.

For example writing a website in C is possible but would be insanely unproductive and you'd be solving issues that other languages and frameworks already solved.

Yet writing an image processing library that has critical performance requirements would likely be best in C/C++.

Your question is too general. Everything depends on deeper specification.

Let me assume (maybe wrong) you trying to choose from two or three languages suitable for your solution? For example Java, .NET and C++. Every language has own pros and cons.

For example architecture design,portability,performance,security, libraries availability and support etc.

There are also some personal preferences like previous experiences, ability to understand and write effective code,time to learn certain language approach etc.

No solution is 'one size fits all' with 100 % compliance of all raised requirements....

So, yes, it does matter.... you have to consider which one you choose to have best fit for your needs, and results might vary over different languages

But no, it doesnt matter ....you can create you solution in almost every language

It matters to an extent but I know I am guilty of delaying personal projects just because I can't decide to go with Python or Javascript. Same with frameworks and other tools.
I envy the monoglot...

"Oh another project, looks like RoR and React"

I have to think about 30 languages and frameworks and figure out the combo to pick..

Yes, different languages are made for different purposes. The concept of low-level and high-level is relative to the task. When writing systems applications you reach for C, C++, whereas for server code you might reach for Scala, Elixir, and obviously you have the platform-specific languages such as Obj-C. When you want to verify your code formally, you might reach for Coq or Isabella, writing theorem provers usually in Standard ML or OCaml.

Furthermore, the tools you use mold your way of thinking. That's why teaching Haskell as an introductory language is a better choice than Java.

I sincerely wonder why people are disagreeing with you, assuming the majority of downvotes signify disagreement.
I'm not one of the down votes, but I read their comment as missing the point of the question. These types of questions rarely are asking "should I use C or Javascript for a web front-end?" so saying "different languages are for different purposes" means nothing. The question, while admittedly unclear, is most likely asking "does it matter if I use Python or Ruby" or "Perl vs PHP" or "C++ or Swift" or "Clojure or Haskell".

There are a lot of languages that, for the most part, are completely interchangeable. That makes it nice for choice, but also makes it hard to decide which language to focus on.

Yes a) Some languages are better suited form some applications than others. You might be able to create a desktop game using Perl, but not really what it is designed to do.

b) There's more than one way to do it and everyone's different. So part of language choice depends on what you are comfortable working with and how you solve problems. Some language, while absolutely are great don't work for some people, and also some languages that seem to some like a piece of crap, others can really rock with.

I think the factors are can the language solve your problems and does the product work well. For the non-programmers languages are all the fiddly stuff, whatever as long as it works.

The more complex/mature the tasks then you have to do more factoring in of language choices for scalability, robustness, readability, etc.

No, not really. You can solve most problems with any number of mainstream languages with a few caveats. 1) The language has to run and be supported on the platform of choice (You probably can't use perl to write mobile apps nor are you likely to use ruby to build windows apps.). 2) If you have known speed, scale or other special requirements ie (you're probably not going to want to run a jvm language on embedded systems, and if you're running a system that's going to get billions of requests a second, you're probably going to want something that's multi-threaded or supports some type of concurrency)
Yes, I think it does matter in a way I seldom see mentioned.

My two favorite languages to develop in are Python and Clojure. When I was building up my last project, I decided to use Python. Why?

Because it is an open source project and it is a project I would like to have other people be able to modify, use, and perhaps push changes back to me.

Suppose I want to turn this into a company and hire on developers? Would I have a more difficult time finding good Python developers or good Clojure developers?

I have been contacted by certain companies over and over for the past 2 years because they want my Clojure knowledge. Quite often, the description is "we made a 500KLOC mess and we need help. We need someone that understands immutability." This doesn't sound like an appealing job nor does it sound like an appealing position to put your company into. Of course, these companies want me to move across the country to work for them, and are completely closed off to remote work. Sure, I like using Clojure, but not enough to append my life for.