diff options
| author | Cliff Click <cliffc@acm.org> | 2025-05-02 15:18:50 -0700 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-05-02 15:18:50 -0700 |
| commit | d7444a70ca43db00b75a3a2b81e5fa49b73410e1 (patch) | |
| tree | d3dd70bff6cd6ca32613b70cf6218e1e73967f0f /chapter22/README.md | |
| parent | af3586252ed3332722ae9eb8133b74f485a420ef (diff) | |
| download | Simple-d7444a70ca43db00b75a3a2b81e5fa49b73410e1.tar.gz Simple-d7444a70ca43db00b75a3a2b81e5fa49b73410e1.zip | |
Add nested classes; string constants, static var lookup.
Add alignment math.
Pick up extern names at call sites
Partial add constant TMP from cpool.
Add constant arrays and singleton TMPs.
Diffstat (limited to 'chapter22/README.md')
| -rw-r--r-- | chapter22/README.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chapter22/README.md b/chapter22/README.md index ef2304d0..b32451f2 100644 --- a/chapter22/README.md +++ b/chapter22/README.md @@ -277,7 +277,7 @@ struct sstr { // Array contents are immutable. // Still figuring out good syntax for this. u8 #; - u8 []!; // Trailing '!'? Makes primitive array contents *immutable* and requires constructor syntax + u8 [~]; // Middlin '~'? Makes primitive array contents *immutable* and requires constructor syntax }; // Construction requires a function that produces the array contents. @@ -341,9 +341,9 @@ struct gstr { // aka germanString, or blend string and register "streg" } // Using inlined object (see below). All these strings are short and are // represented as packed integers in a 64b register. -gstr *prize1 = "gold"; -gstr *prize2 = "silver"; -gstr *prize3 = "bronze"; +*gstr prize1 = "gold"; +*gstr prize2 = "silver"; +*gstr prize3 = "bronze"; ``` @@ -399,7 +399,7 @@ ref.c.len(); val.c.len(); // Function arguments use the same typing, so can pass-by-value -val math.sin = { Complex *c -> ... }; // Passes a complex by value +val math.sin = { *Complex c -> ... }; // Passes a complex by value math.sin(ref.*c); // Requires de-reference to pass by value math.sin(val. c); // Pass by value |
