Why Nostr? What is Njump?
2024-04-03 03:37:05

Henrik Bengtsson on Nostr: Thought experiment: What would be possible if we could declare an #RStats object ...

Thought experiment: What would be possible if we could declare an #RStats object read-only, eg

x <- 0:9
readonly(x) <- TRUE
x[2] <- 4L
# Error: Object 'x' must not be modified

or lock its type, eg

x <- 0:9
coercable(x) <- FALSE
x[2] <- 4
# Error: Object 'x' must not be coerced: integer -> numeric

Things I can imagine:

* protect against thinkos and bugs
* early error detection
* further {compiler} code compilation
* cleaner code, e.g. less manual assertions
* enhanced code completion
* …?
Author Public Key
npub1qs42ufp4tcaf4yyd86sylfn8czprgeksl5872c2dj4ccedmjf3vql7tvmc