DEV Community

Leandro
Leandro

Posted on

Is Python to AI what Javascript is to the Web?

I have been experimenting with Gemini CLI and successfully used it to build a small apps and automation scripts. It seems that, unless otherwise requested, Gemini tends to prefer to use Python as the programming language to use. I can see why:

  • Relatively simple
  • Multi-platform
  • Has a vast ecosystem of libraries
  • Interpreted

And surely I am missing other advantages that someone with more knowledge about it can point out. It makes sense AI will work better with some languages than others and I even expect new languages to emerge that make it easier for LLMs to work with them. However, I seem to already be building up a collection of useful code written in Python, so I may be inclined to continue to use it so I don't have to install too many different toolchains and I can reuse it when possible.

I would be curious to know if other LLMs prefer other languages, like Javascript or Go, and what experiences other developers have had.

Top comments (3)

Collapse
 
dotallio profile image
Dotallio

I totally get why you stick with Python, I've ended up doing the same for most AI tools just because everything connects so easily. Have you tried using Node.js or running LLM workflows with Javascript, and did it feel any smoother (or rougher)?

Collapse
 
argenkiwi profile image
Leandro

I haven't tried it yet, but hopefully I will have some time to try it out soon.

Collapse
 
argenkiwi profile image
Leandro

I have now found project PocketFlow and it's getting worse. XD