[spam][crazy] coding therapy: hello world with structure

Undescribed Horrific Abuse, One Victim & Survivor of Many gmkarl at gmail.com
Thu Oct 13 17:00:40 PDT 2022


i havent learned rust yet for becoming-obvious reasons

struct HelloWorld {
  hello: String,
  world: String
}

impl HelloWorld {
  fn print(&self) {
    println!(“{} {}”, self.hello, self.world);
  }
}

fn main() {
  let helloworld = HelloWorld {
    hello: “hello”,
    world: “world”
  };
  helloworld.print();
}


More information about the cypherpunks mailing list