Closed aleclarson closed 5 years ago
Everything in the language will be immutable unless marked otherwise, there is currently no way to mutate values in Ghost
@jamiebuilds Can I assume generators will be immutable, too? (so no need for libraries like https://github.com/pelotom/immutagen)
Ghost doesn't have "generators" as they are in Python and JavaScript. Ghost has "iterable functions" and yield
does not wait for a value to be passed to iter.next(value)
.
As such iter.next()
is idempotent (and immutable).
WDYT of adding sugar for readonly properties (or even objects/arrays)?
I like Flow's
+
syntax.