gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

What is the semantics of `...` ? #99

Closed apblack closed 8 years ago

apblack commented 8 years ago

We agreed long ago that we should have ... in Grace, so that examples containing ... could be compiled. I don't recall that we agreed on the semantics of ...

I had in mind that ... was essentially a "nice" wrong, so that attempting to evaluate it would "go wrong", but not cause silent non-termination like ⊥.

I was a bit surprised to find that in minigrace evaluating ... is s no-op. In other words, as a command, ... is equivalent to skip. (As a value, it's distinct from other objects.)

Is this what we want? I'm inclined to think that evaluating ... should raise an exception, but couldn't decide of what kind. A sub-kind of ProgrammingError?

KimBruce commented 8 years ago

????

Is this a sardonic comment on our current state?

apblack commented 8 years ago

No, it isn't. I just put ... in some incomplete code that I was writing, and was surprised that it ran without generating any sort of error.

kjx commented 8 years ago

I'd like to be able to test code with ... in it, but really, do we want to put that in the spec?

apblack commented 8 years ago

I propose that evaluating ... should lead to an immediate error.

KimBruce commented 8 years ago

I don't mind that, but agree it probably shouldn't be in the spec (maybe an appendix?)