this post was submitted on 29 Jan 2025
23 points (96.0% liked)

Programming

18101 readers
80 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
 

I'm currently suffering a dilemma and I’m considering using Odin over Rust.

I was hoping for friendly and positively constructive assessments of which language and why from anyone who wishes to answer?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 1 week ago (6 children)
[–] [email protected] 3 points 1 week ago (5 children)

Hobby game engine, i'm debating if Odin being a quick, simple and performant language would help me get my idea from in my head into RAM

[–] [email protected] 2 points 1 week ago (1 children)

For any other use case, I would have recommended Rust, but for making a hobby game engine, I would advise not using either rust or Odin and instead use C and C++. The graphics drivers have a primary C Abi and you would spend a really long time debugging C to Odin/Rust translation layer bugs than actually working on he engine.

I would suggest write a C rendering library, wrap it in safe Rust and move on from there.

[–] [email protected] 3 points 1 week ago

I already know C/C++, I love them but I never use them again. Rust's borrow checker is still active in unsafe Rust, combined with Miri it detects most UB, leaks and various other problems. For instance I’m building a allocator now in Rust and i know it compiles and Miri didn't complain, sure i can do it in C and use Valgrind but Rust makes it a dream.

I know for Odin there are 3 tools i was looking at which could validate it for UB and leaks at runtime, but what attracts me to Odin is the fact it's not OOP and simple. I'm considering using it because i will be more debugging my game, rather than the language (to quote Zig).

But all that being said I’m good with Rust and it's tooling, so I’m probably going to remain with Rust. But yours and everyone's opinions is helping me form this so thank you!!

load more comments (3 replies)
load more comments (3 replies)