Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Grammar token abbreviation #25

Closed
wants to merge 3 commits into from
Closed

Conversation

sollyucko
Copy link

@svenpanne
Copy link

Hmmm, with these renamings https://gitlab.haskell.org/ghc/ghc/blob/master/compiler/parser/Parser.y and the spec would get out of sync, which would really be a pity.

Personally I find the abbreviated names much more readable than the long monsters, but this is probably only a personal preference. Compactness has its value, because you can grasp the structure of the productions more easily. There is a reason mathematics uses one-letter names all over the place. 😄

And how does the modified grammar fit onto a printed letter/A4 page?

Furthermore I am not completely sure which audience is targeted: Compiler/Haskell folks can grasp the abbreviated names quite easily, because the way they are abbreviated is common. Newcomers OTOH probably won't understand the meaning of a qualified-constructor-symbol more easily than a qconsym.

I'm all for better cross-referencing, though.

@goldfirere
Copy link

I'm close to the fence on this one, but would probably lean toward keeping the short names we have now. That might be only because I already know them, but I think @svenpanne's question about audience is apt.

Perhaps a fix that would work for everyone is simply to document the abbreviations, saying that q means qualified and tycon means type constructor, etc.

And yes to cross-referencing.

@llelf
Copy link
Member

llelf commented Apr 9, 2019

I also don’t see long names as more readable.
And, as I mentioned on a mailing list, we have to think about pdf too.

@sollyucko
Copy link
Author

I think leaving the abbreviations as-is but documenting them sounds reasonable. Adding tooltips would also be useful, but it might be difficult and time-consuming to implement. Same thing for links, although those would also need to have a canonical location to point to (perhaps section 10, Syntax Reference.

@sollyucko sollyucko closed this Apr 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants