Conversation
9f73dfb to
2fc3e66
Compare
|
TODO: add some EvalTests |
|
Would the question mark operator work here? |
|
Yes, although I think it is already being used for what I originally understood as an assert. We can repurpose as guard (which won't raise/crash). Or we can rename to I'm a liiiiittle wary of having a bunch of symbols |
|
Yeah, Regarding symbols, one of my design goals of scrapscript is to actually have no alphabetic keywords in the whole language! I don't know why this was a goal of mine, but I think it's a constraint that's encouraged "small" thinking. |
|
I think if we drop its meaning as assert and instead use it to mean guard (and fall-through on guard failure, instead of crash), sure, why not |
|
Then it's possible to write |
|
Love it! Great idea |
Adds guards to pattern matching:
Where guards run in a merged version of the match case env and the env created by the pattern matching.