Closed apblack closed 1 year ago
I thought we'd already decided to do that, and amg was just keeping backwards compatibility
I don't know what "amg" is, but my recollection was that Kim wanted to keep this exception permanatly. (If I'm wrong, that's great.) The backwards compatibility concession that I remember was allowing type
in place of interface
. This was removed in d100bf7 (July 2018), when the SmallGrace parser showed that it was ambiguous.
I don't know what "amg"
Andrew's minigrace
The backwards compatibility concession that I remember was allowing type in place of interface.
I can't remember. we should get rid of it anyway.
I don't know what "amg" Andrew's minigrace
Andrew’s minigrace hasn’t seen a commit in almost 3 years. I don’t think that it’s relevant any more.
I would like to have @kimBruce’s approval before removing it.
I would still like to have @KimBruce’s approval before removing this exception.
OK, go ahead. We've been adding interface in all those circumstances anyway (though I suspect the text will need lot of modifications, sigh).
The grammar was fixed to remove the interface non-terminal in commit bd3062a (on 6 July 2020). This issue should have been closed at that time.
I believe we did agree on this, though I see I did not change the example in "Programming with Grace".
On Sun, Nov 27, 2022 at 2:15 PM Andrew Black @.***> wrote:
Closed #177 https://github.com/gracelang/language/issues/177 as completed.
— Reply to this email directly, view it on GitHub https://github.com/gracelang/language/issues/177#event-7898248494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN2D6UO4ESLONDY3MJYHYDWKPMQHANCNFSM4HWWIE4A . You are receiving this because you were mentioned.Message ID: @.***>
-- Prof. Kim Bruce Computer Science Pomona College
We currently have an odd exception when writing interface literals: when an interface Literal is the only thing on the right-hand-side of a type declaration, it's legal to omit the leading
interface
keyword.This exception is codified in the following rules:
The reason for this exception is backward compatibility with an older syntax where types were interfaces, and there was no
interface
reserved word.I believe that it is time we got rid of this exception. Interfaces should always have the leading
interface
reserved word. The exception creates confusion in the minds of new contributors (see, for example, gracelang/minigrace#291), makes the grammar more complicated than necessary (the distinction between anInterface
and and anInterfaceLiteral
, and the two alternatives forTypeDeclaration
), and correspondingly complicates the parser. More importantly, it breaks our rule about readability being more important than writability.