-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identifier characters #7
Comments
my simple proposal:
i hate single-quotes being used for things unclosed. it wreaks havok on the generic syntax highlighters that many editors apply when they don't recognize the source type (or when your source gets mis-recognized)... but that doesn't mean i want to disallow them. i just don't want to use them like that. however, if we end up using single-quotes for something else then i will want to disallow it in identifiers. at that point it will probably be in our list of specials and will cause great lexers pains if its allowed in identifiers. speaking of which, do we have single-character literals? i don't love semi-colons or back-ticks in identifiers (for the same reasons mentioned above), but don't see a reason to disallow them unless we want to reserve those for tokens |
here is my more formal proposal: https://github.com/jdpage/jeff65/wiki/Identifiers |
Wiki might not be the best place for proposals -- it's hard to comment on them there, so I'd prefer that we created a directory containing proposals and then used branch/pr to track which ones are accepted and which ones are being workshopped. Also, I actually don't like |
Currently, pretty much any character is allowed in identifiers except for
()[]{}:.,"\
, as long as the identifier begins with an alphabetical character. This is probably a little too liberal, though I would definitely like to preserve the following characters:-
-- I rather likekebab-case
since you don't have to wildly mash the shift key to type multi-word identifiers. Lisps typically name things like this, though it does require that if you want to infix-subtract from a constant you have to put a space between them, which seems reasonable anyway.?
-- useful for predicates. Ruby uses this.!
-- useful for marking functions which change their arguments. Ruby again.'
-- useful for marking helper/variation functions. Haskell this time.I'm inclined to be pretty liberal about what goes in identifiers at first, especially since this isn't an especially punctuation-heavy language, though allowing
;
and back-ticks inside identifiers rubs me the wrong way somehow.The text was updated successfully, but these errors were encountered: