2. Ecosystem. I might choose a language for a game based on available frameworks. Or Python for ML based on available libraries. Or if you want to work with XMPP, Erlang is handy to know.
3. Familiarity. You’ll move faster and write better code with a language and ecosystem you and your team are already familiar with.
But often there are many valid options and you just have to choose one.
>Say, i want to build tcp client for check connection and can deploy anywhere without install any dependency
Why? What are you trying to accomplish? Where do these constraints come from? Where does the no dependency constraint come from? Where does deploying anywhere come from? Where does checking the connection come from? What is the real problem you are trying to solve?
These questions are to avoid the XY problem, to avoid the trap of solutionism, and to get to the "Job to Be Done".
Someone once asked me how to solder a thick copper wire to a thin steel plate. When I asked him why, I listened in disbelief as he answered that the fuse blew out and that he was going to get a thicker wire and solder it so it doesn't blow out. His solution comes from an incorrect diagnosis of the problem at hand, and he asked me about the solution framed as problem, not the true, root, problem.
To answer your question: it depends.
For everything else, you either go with what you know, or just try to evaluate the best choice based on the language and toolchain.
1) languages I know and like.
2) what are other things in the same area written in? This doesn’t mean those languages and libraries are best, but it does mean they will be well supported. Someone will update stuff to iOS 16, or when chrome changes how cookies work, or care when one of your users has 4 monitors all at different resolutions. If you pick something obscure enough, you are fixing all those things yourself.
I'd rather spend my limited time developing features, not updating the code to the latest node/python/pip/uv/yarn/framework version.
If I don't maintain the code, upgrading is way harder, b/c trying to figure out which dependency works for what version of what framework/language is a nightmare.
Then my teams ignore all that research and build it in the language they build everything in.
Step 1: Raise your eyes above the computer monitor in front of you. What is the team / company already using? What will they likely be using in one year from now?
Step 2: Ask yourself honestly without "I wish I could and I wish I would" - can the problem be solved using the tech that the team / company already has invested in?
Step 3: Make decisions. Default to the answer in Step 1, but consider the evaluation in Step 2. Try to get as close to 1 as possible.
At home / "for the shits and giggles": Whatever is interesting. Sometimes even bending backwards to force functionality out of tech that has absolutely no business doing what I want it to do.
System stuff go/pyhon. I haven't had time to learn either Rust or Zig, but I think Golang is good enough for now.
I have a lot of java experience, but to be honest the opensource toolchain outside big tech is too much of a pain to use (say gradle or mvn). I believe SBT is quite good but learning scalla goes into the bucket alongside rust and zig.
This comes after creating several large scale personal projects completely using AI in python.
It is interesting to think about what affordances will make AI most productive.
Step 2: write a blog post about how your decision has improved application performance, stability, and development time. State as much opinion as fact as you can. Then submit that to HN.
Step 3: enjoy your new found status as a tech leader.
- stable APIs of essential libraries and frameworks
- a grown up culture that accepts that something isn't dead just because it doesn't get an update 8 times a day
- tooling that will still work and be supported after 5 years (not a new package manager or build tool every year)
- communities and individuals around it that are focused on getting things done instead of status and drama
1. Your first choice should be the language you or your team knows best.
2. Every language is built to solve certain problems and are, at the end of the day, opinionated. This may not be true for the most popular generalist programming languages; but stuff like Purescript for example, is great if you already have a Haskell codebase, with Haskell developers and you need a frontend. Easy to onboard/get productive in vs learning React/hiring React devs.
Choosing the right tool for the job is imperative. I will not use Rust for my web UIs, I will not use Javascript for writing code on embedded devices. Research and decide accordingly based on how it fits your existing pattern of thought/time constraints/end-goals.
3. Avoid language zealots and maximalists. People who'll try their best to convince you to write and do everything in a single language. A lot of Rust people will attempt to write everything in the entire project in Rust, even stuff like web UIs. This creates unnecessary friction, and you end up fighting the language rather than being productive.
4. Have fun, learning a language expands your thought process, it exposes you to different ideas, ideas that you may bring into other languages. For example, after learning/working with Haskell I wrote my own small utilities for higher-kinded types in Typescript.
5. Languages are a tool, choose a tool that's right for the job depending on how long you have and how adept you are with your existing tools.
gethly•2d ago
Also, you can ship fast and write more performant version, possibly in different language, later.
OccamsMirror•2h ago
gethly•39m ago