Comment

Comment by throwawaymaths

> For me the value in Zig is its simplicity as a language

I was reading an article about rust posted here yesterday and i realized: i have no clue what is going on in this code (also i presume "templage" is a typo):

    #[derive(Debug, Default)]
    pub struct Context {
        authed: bool,
    }

    #[derive(Template)]
    #[templage = "layout.jinja"]
    struct HomeTemplate {
        ctx: Context
    };

    pub async fn home() -> impl 
    IntoResponse {
        HtmlTemplate(
            HomeTemplate { ctx: 
    Context::default() }
        ).into_response()
    }

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton