DEV Community

Discussion on: Rust or Go for web development?

Collapse
 
yaser profile image
Yaser Al-Najjar

Hi Selen,

I would say not Rust nor Go...

Python / C# / Java are pretty solid options in the web development industry.

And for Turkey, C# is the way to go.

  • If you're a frontend developer, you just wanna get your feet wet in the backend... Firebase would be enough.
Collapse
 
selengora profile image
Selen Gora

Thank you Yaser ☺️
I’m not considering job apply or want to be fullstack. My interest and want to learn for fun but hey, if I achieved well maybe I will go further and extend my profession.

Collapse
 
yaser profile image
Yaser Al-Najjar

Heck yeah for FUN 😁

Try Flask (with Python), I'm sure you will love it.

Thread Thread
 
selengora profile image
Selen Gora

Lol I will look it 🙋‍♀️

Collapse
 
slushnys profile image
Zigmas Slušnys

check out FastAPI its written in python and is said to be as fast as go or nodejs when it comes to concurrency.

Collapse
 
krusenas profile image
Karolis

After switching from Python to Go several years ago - I can't look back :) In Go you just don't have problems like pip install requirements.txt or thinking how to run multi-core or deploy some RabbitMQ just for messaging on a single node. Docker images are slim, great ecosystem, easier testing and due to static types - code quality is better.

Go is a very refreshing language after Python :) Not saying Python is bad, but there are better tools for the job. Python is great for data wrangling, machine learning.

Collapse
 
yaser profile image
Yaser Al-Najjar

Karolis, let's have a more constructive argument

In Go you just don't have problems like pip install requirements.txt

What problems did you face exactly?

Thinking how to run multi-core or deploy some RabbitMQ just for messaging on a single node

There are many ways to achieve async, RabbitMQ is one of them (but it's pretty solid one), please read more here on async approaches:

dev.to/yaser/how-c-asynchronous-pr...

Docker images are slim

You mean golang:1.13.0-alpine3.10 which is 359MB

Comparing to python:alpine3.7 which is 81.3MB

That's 3x times difference in the size, big plus for Python.

great ecosystem

No one can say that Python has one of the largest community + OSS libraries and frameworks.

easier testing and due to static types

You can do static typing in Python too.

code quality is better

Code quality is something conceived as easier to read and maintain (which Python is better at).

but there are better tools for the job

I would say exactly the same for Go, it's meant for high performance web apps (google-like products).

Thread Thread
 
krusenas profile image
Karolis
  1. Problems with installation/deployment were mostly pre-docker behind corporate proxy which didn't allow pip :) So it was an interesting ceremony of bundling dependencies and then installing them from that cache.
  2. I heavily used Tornado and Twisted frameworks, but it's single single core, you always feel like there's so much more you could do but you can't without additional plumbing.
  3. That Golang image is a compiler toolchain, Golang binaries do not actually need anything else, you can use Scratch or alpine image, resulting image is usually ~10MB.
  4. Some people think that Go is still lacking in ecosystem, in my ~4 years of professional work, I have never missed a single library :)
  5. Regarding code quality - static types really increase code quality and Go applications are easier to read/understand than many other languages. What's important is that if you want to see how some std lib is implemented, you just click on that function on dive into it. With Python it's often not the case.
  6. Just high performance is one thing but another thing that's quite important and often overlooked - how cheap will it be to run your side project? With Go you can use just ~10MB of RAM and 0-1% CPU, this makes it a good language to write services that can be cheaply deployed :)

I still like Python but with my current projects that I work on, it wouldn't be a good fit.

Thread Thread
 
yaser profile image
Yaser Al-Najjar

I can see how it fits pretty much into what you're doing.

Many many business don't care about resources (cuz the price is very negligible).