summaryrefslogtreecommitdiff
path: root/drafts/it's not rust vs go.html
blob: 6826d55967def054fa8ff61f1eee0c4c23957c12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<h1>"Rust or Go?" is not the question</h1>
<h1>Part 2: (But Rust is definitely the answer)</h1>
-> part 2 include coworker conversation tidbits draft notes:
<ul>
  <li>These are two very different languages</li>
  <li>These two languages are solving two very different problems</li>
  <li>
    What attracted me to Rust is the error handling and borrow checker. You
    don't need a runtime and you don't need to worry about a variety of memory
    pitfalls.
  </li>
  <li>
    Rust is not just a systems-level language, and Go is not just a server-side
    language.
  </li>
  <li>Rust isn't *really* about speed or performance. It's about safety.</li>
  <li>Rust is just plainly a more powerful language.</li>
  <li>
    Go is for Python developers who need speed. Rust is for C++ developers who
    need safety.
  </li>
  <li>
    Rust has opt-in concurrent runtimes and opt-in garbage collection. These are
    standard in Go, there's no getting out of them.
  </li>
</ul>

<p>
  Go has great concurrency. Goroutines are high-performance, parallel green
  threads. Rust's concurrency is provably-correct.
</p>

<p>
  Why is the immediate question when someone says they wrote something in Go,
  "why not rust?". The inverse is true. When I tell a dev I wrote something in
  Rust, the immediate response is "you should have used Go, it's better." This
  is false.
</p>

<p>
  What does suck about Rust? The compiler is slow. It will probably always be a
  degree of magnitude slower than another compiler for a similar target.
</p>

<p>
  It's not Rust vs Go, it's when to use Rust and when to use Go. And the number
  one argument I get for why Go should be used is it's simpler and faster to
  learn and work with. There's the answer! The answer is use whichever one works
  best for you. There's no better or worse, or superiority. Redditors will say
  otherwise.
</p>

<p>sources</p>

<p>
  Go vs Rust discussions are ridiculous. It should be more like: When to use Go.
  When to use Rust. When to use X… — Inanc Gumus (@inancgumus) September 19,
  2019
  <a
    href="https://twitter.com/inancgumus/status/1174728131925676032?ref_src=twsrc%5Etfw"
    >source</a
  >
</p>
<a
  href="https://insights.dice.com/2020/08/27/rust-in-trouble-after-big-mozilla-layoffs/"
  >Is Rust in Trouble After Big Mozilla Layoffs?</a
>
<a href="https://foundation.rust-lang.org/posts/2021-02-08-hello-world/"
  >Hello World! (Rust Foundation)</a
>

<a href="https://killedbygoogle.com/"> Killed by Google</a>

<p>quotables</p>

<blockquote>
  Take a look Go as well. I think you will find Go much faster to program in.
  The other aspect is threading. They have very different threading models. Not
  sure if you had the chance to research that yet or not
</blockquote>
<blockquote>
  Yes, a big thing is threading. Unfortunately, Rust uses a similar model as
  Java for threads :(. Go is based on Fibers approach which so much faster for
  temporary, lightweight requests. Go is definitely superior for HTTP REST API
  apps. Rust can be better for a single-thread app or general "systems"
  programming.
</blockquote>
<blockquote>
  The only way is to learn and try both. That's what I did. Most of the info
  from both sides is biased...Go is definitely very fast and [garbage
  collection] is not the issue people make it out to be. I started last month
  porting [a chess] engine to Rust. I recently took a break from it because the
  syntax and borrow checking were getting insane to deal with. Once I learned
  about the threading issues in Rust, I have put it on the shelf for now. Rust
  is still evolving which is good and bad. It needs better IDE and Debugging
  support than current levels. Hopefully that will continue to improve. There
  was a big Mozilla shakeup (Nov 2020) where they let go of the Rust developers
  and cancelled the project. AWS hired them. So honestly, I am not sure which
  direction the language is going in. Meaning, now that AWS owns the braintrust,
  I don't know where they are headed. My guess is that AWS is using Rust for
  some behind the scenes script-like stuff. Not sure. Will be important in the
  next year or two on which direction things end up going. For Rust to benefit
  long-term, it needs the support of a corporate backer
</blockquote>