.md

mortimer.nl

My personal website.

articles

starting a company

things with names

more about me

fn main() {
    let me = Person::new("Mathijs");
    me.whoami();
}

struct Person {
    name: &'static str,
}

impl Person {
    /// Who am I, what am I doing here?
    fn new(name: &'static str) -> Self {
        Self { name }
    }

    /// Maybe the answer is here?
    fn whoami(&self) {
        println!("Hi, I'm {}!", self.name);
    }
}

x.com GitHub