diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-03-18 23:47:45 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-25 14:36:46 +0200 |
commit | 2323ca6c9ec3c8ee76b9acf13745b80b92952a6a (patch) | |
tree | 93013237dbcb0fa96ceb5f3c026fd040aff464cf /doc | |
parent | 5a93c32a59775cd1be4b4f450e8230016b434366 (diff) |
Add struct, import caching, binop ops etc
Diffstat (limited to 'doc')
-rw-r--r-- | doc/DESIGN.md | 6 |
1 files changed, 3 insertions, 3 deletions
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 } |