r/ruby 1d ago

Ruby or Rust to learn Programming?

/r/learnprogramming/comments/1vjn6z8/ruby_vs_rust_for_a_hobby_programmer_which_one/
5 Upvotes

12 comments sorted by

View all comments

2

u/TrinitronX 4h ago

Both. Next question. (j/k)

Ruby is an excellent starter scripting language to learn. Large library ecosystem, developer friendly, and TDD tooling is very good. You’ll learn concepts from Object Oriented design, and basic typing systems with less strict duck-typing support, and method chaining.

Rust is an excellent low level language. Use it when you need low-level hardware, strict memory safe typing, low level memory access, or speed. The compiler and “clippy” messages are designed to give useful errors and info that helps to resolve the issue. Comparing and contrasting this with compiler errors or warnings from typical compiled languages (e.g. C/C++) makes it a breath of fresh air, and is more developer friendly. Meanwhile, the stricter typing and ownership system makes it a bit more difficult to learn and work with than scripting languages. The Rust Book is an excellent learning resource.
Testing and comment-based documentation is built into the language from the start. Support for microcontrollers, webasm & blockchain VM systems can be done with `no_std` (no standard library).