From 2323ca6c9ec3c8ee76b9acf13745b80b92952a6a Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 18 Mar 2019 23:47:45 +0100 Subject: Add struct, import caching, binop ops etc --- doc/DESIGN.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/DESIGN.md') diff --git a/doc/DESIGN.md b/doc/DESIGN.md index 37ca82a..7781cd1 100644 --- a/doc/DESIGN.md +++ b/doc/DESIGN.md @@ -92,7 +92,7 @@ const main = fn() !void { ## Structures and instances ``` -struct User { +const User = struct { name: str, age: i32, level = 1 // default value is 1 and type is i32 @@ -124,7 +124,7 @@ const main = fn { ## Named parameters Functions call be called with arguments in position that matches the parameters or by using the names of the parameters. ``` -struct User { +const User = struct { name: str, age: i32, level: i32 @@ -165,7 +165,7 @@ doesn't change location after realloc, which would be the case for pointers. ``` const ArrayList = @import("std.array.ArrayList") -struct User { +const User = struct { name: str, level: i32 } -- cgit v1.2.3