-
Notifications
You must be signed in to change notification settings - Fork 55
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
How to make use of single quotes? #193
Comments
Some languages (e.g. XML) allow both |
Our delimited identifier syntax is ugly, so it's an obvious choice to make use of single quotes. The question is whether delimited identifiers are sufficiently widely used to justify dedicating single quote to them. They are not much used in other languages, but maybe we can use them more:
Is that enough? I'm not sure. |
In Excel, single quote is used at the beginning of a cell to indicate that something that looks like a number should be treated as text. |
So I think the realistic options are:
|
I think 2(i) is the most Mort-friendly, and the most consistent with our "be familiar" design principle. There's a strong C-family expectation that At the same time, I do not like our delimited identifier syntax, and think we should make another effort to find something better. |
Another data point: SQL 92 uses double quotes for delimited identifiers. |
Could use |
Using single quotes for delimited identifiers would cause problems for the unwary: string s = "!whoops!";
// lots of code here
string x = "person";
x = x + 's'; |
Single quotes were used by symbolic string literals but are not any more.
Should we use them for something for which we are now using a less pleasant syntax? e.g.
^"xxx"
delimited identifiersstring`${x} and ${y}`
interpolated stringsThe text was updated successfully, but these errors were encountered: