# Julia == rust + dynamic\_typing + JiT + GC?

**URL:** https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778
**Category:** Offtopic
**Tags:** rust
**Created:** [January 10, 2023, 10:27pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778 "2023-01-10T22:27:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Jasha10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jasha10/32/7508_2.png) [@Jasha10](https://discourse.julialang.org/u/Jasha10)
#### Post date: [January 10, 2023, 10:27pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778/1 "2023-01-10T22:27:03Z")

</div>

Dabbling in Julia and then recently beginning to learn rust, it seems to me that the two languages have a lot in common.

My impression now is that the most fundamental differences are that Julia has:

- dynamic typing
- JiT compilation (as opposed to ahead-of-time)
- garbage collection

Each of these design decisions has tradeoffs. For example, dynamic typing means Julia is flexible, while Rust’s static typing means its compiler can emit rich ahead-of-time feedback.

Of course there are other differences, e.g. syntax or convention around how traits are defined, but those differences feel like they’re only skin deep.

Is my list above missing anything?

---

<div class="post-metadata">

### Author: ![Jeff\_Emanuel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff_emanuel/32/15440_2.png) [@Jeff\_Emanuel](https://discourse.julialang.org/u/Jeff_Emanuel)
#### Post date: [January 10, 2023, 10:36pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778/2 "2023-01-10T22:36:16Z")

</div>

Multiple dispatch:

> [@For Julia programmers who also work with Rust: When you write in Rust, do you miss Julia's multiple dispatch, or are there features of Rust that make up for that loss?](https://discourse.julialang.org/t/for-julia-programmers-who-also-work-with-rust-when-you-write-in-rust-do-you-miss-julias-multiple-dispatch-or-are-there-features-of-rust-that-make-up-for-that-loss/61959):
>
> Sorry if this is too off-topic, I’ll delete it if so.

---

<div class="post-metadata">

### Author: ![Jasha10](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jasha10/32/7508_2.png) [@Jasha10](https://discourse.julialang.org/u/Jasha10)
#### Post date: [January 10, 2023, 10:42pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778/3 "2023-01-10T22:42:25Z")

</div>

My impression was that, while rust functions don’t have multiple dispatch, generic rust traits _can_ have multiple dispatch, which lets you accomplish pretty much the same thing (though it’s more verbose).  
For example:

```rust
impl MyTrait<i32, &str> for MyStruct {
  fn foo(self, x: i32, y: &str) { ... }
}
impl MyTrait<u32, String> for MyStruct {
  fn foo(self, x: u32, y: String) { ... }
}

```

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [January 10, 2023, 10:42pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778/4 "2023-01-10T22:42:31Z")

</div>

> [@Jasha10](#):
>
> Dabbling in Julia and then recently beginning to learn rust, it seems to me that the two languages have a lot in common.

For comparisons of Julia and Rust, see e.g.

- [Rust / Julia Comparison Post](https://discourse.julialang.org/t/rust-julia-comparison-post/75403)
- [Rust vs Julia](https://discourse.julialang.org/t/rust-vs-julia/11979)
- [Comparison of Rust to Julia for scientific computing?](https://discourse.julialang.org/t/comparison-of-rust-to-julia-for-scientific-computing/78508)

Probably it isn’t productive to start another general thread on this topic.

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [January 12, 2023, 5:33pm UTC](https://discourse.julialang.org/t/julia-rust-dynamic-typing-jit-gc/92778/5 "2023-01-12T17:33:15Z")

</div>

I’m fairly confident that overloads like that are resolved entirely statically in Rust, which makes it not dispatch of any kind, let alone multiple. Syntactically similar, expressively very different.
