Saltar al contenido

ejemplo de código r / rust rust vs python

Ejemplo 1: óxido vs python

If you just want to learn programming, first learn python then rust.

Rust is:
=> systems programming language without a garbage collector focused on three goals: safety, speed, and concurrency
=> Faster than python
=> Compiled directly to machine code
=> Similar to Go and C
=> Has better thread and memory managment
Why should you use it:
  -> You need speed.
  -> You want to do something low level

+---------------------------------------------------+

Python is:
=> multi-paradigm, dynamically typed, multipurpose programming language.
=> easy to learn
=> interpeted
Why should you use it:
  -> When you want simplicity
  -> When you are doing something general purpose
  -> When you dont care about speed
  -> readability

+---------------------------------------------------+

Python:
var = 0
print(var)
var += 1
print(var)

Rust:
fn main() {
    let mut var = 0;
    println!("{}", var);
    var += 1;
    println!("{}", var);
}

Ejemplo 2: óxido vs python

//hello world in rust
fn main {
	println!("hello world);
}

#hello world in python
print("Hello World")
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)



Utiliza Nuestro Buscador

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *