Skip to content
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

short-form strings #1

Open
oatmealine opened this issue May 21, 2023 · 0 comments
Open

short-form strings #1

oatmealine opened this issue May 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@oatmealine
Copy link
Owner

typing out quotes for label names, characters, etc. is kind of obnoxious. proposal:

character "fella"
character "somelabel"
-- ->
character :fella
goto :somelabel

inspired by Crystal's Symbol syntax, keywords (words with no spaces) could be prefixed with : to be quickly turned into a string. this would greatly help readability in cases like this to provide an easy, lexical difference between option text strings and label name strings:

"option 1" -> :option1
"option 2" -> :option2
"option 3" -> :option3

also applicable to just about anything that could require shorthand strings, like expressions

character :fellow
expression :happy
@oatmealine oatmealine added the enhancement New feature or request label May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant