diff options
| author | Cliff Click <cliffc@acm.org> | 2025-01-20 10:02:24 -0800 |
|---|---|---|
| committer | Cliff Click <cliffc@acm.org> | 2025-01-20 10:02:24 -0800 |
| commit | e0ab1b3a6fe5205c1d41b91de66254f0c1b46b36 (patch) | |
| tree | 28df0dbc7c6f8b9f0ca59761aa3e3aff9c1073cd /chapter17/README.md | |
| parent | cfecd341531f29ba7d67decdd907071a9e49cf60 (diff) | |
| download | Simple-e0ab1b3a6fe5205c1d41b91de66254f0c1b46b36.tar.gz Simple-e0ab1b3a6fe5205c1d41b91de66254f0c1b46b36.zip | |
more readme updates
Diffstat (limited to 'chapter17/README.md')
| -rw-r--r-- | chapter17/README.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chapter17/README.md b/chapter17/README.md index 6c19b642..d56ab7bb 100644 --- a/chapter17/README.md +++ b/chapter17/README.md @@ -46,10 +46,11 @@ infers as Typed primitive fields are always mutable. Typed reference fields without an initializer must be mutable to get a value. Initialized reference variables -are *immutable* by default and can be made mutable with a leading `!`. `var` -and `val` keep their current sense and can be used to make any field mutable or -immutable. Fields are always mutable during construction, but will become -immutable at the end of either constructor. +are immutable by default and can be made mutable with a leading `!`. Contrast +this with what [chapter16](https://github.com/SeaOfNodes/Simple/tree/chapter16) +did with `!`. `var` and `val` keep their current sense and can be used to make +any field mutable or immutable. Fields are always mutable during construction, +but will become immutable at the end of either constructor. `int x; x=3; x++; // OK, primitive so mutable` |
