Why you use single quote for strings but no standart quote "" for strings? In my opinion single quotes should be use for signel unicode charset, but not for multi characters strings. Its looks like PHP :d
Python as well.
This decision is not final.
In my opinion they look cleaner and don't require shift on most keyboards.
I think it's useful to have both variants, because I much prefer using double quotes, but I know that a lot of people prefer using single quotes. Also, I mentioned before that it removes some cases where escape sequences would be necessary otherwise.
Double quotes will be allowed, but converted to single quotes by vfmt for consistency. Unless the string contains '.
I like that idea.
I love single quoted strings. There must be a good reason why strings should be double quoted. We must get rid of the burden of old languages. And rethink everything.
Certain kind of applications (e.g. webpage generators) would benefit from "natural form of strings" (there are many names for that):
s : string = [[[
Whatever is here
is one string which doesn't require noise
in form of quotes, explicit newlines, string concatenation, etc.
]]]
The next step could be string interpolation, feature whose alternatives are clumsy or unusable (as C++ streams):
x := 111
y := 222
s : string = [[[
x = $(x), y = $(y)
]]]
There may only one option, which quote style is faster in compile time ,which wins.
One good reason for double quoted strings (besides not escaping apostrophes) is that editor lexer code for C can be reused for V just with a different list of keywords. E.g. cross platform scintilla.org full featured editing component has a configurable C lexer where you can set the keyword list and other things like whether to support raw strings (for recent C++). Geany, notepad++ and many other editors use scintilla.
Also why not allow optional semi colon ?
It would allow share code between languages (C/C++/Java).
Cheers !
I main which symbol can be handled faster in compile time, which will be prefered.
for example symbol ‘ in ascii is 0010 0111 and symbol " is 0010 0010 , so in compile time ' is bigger than " in final binary file.
so use more " than ' can be faster in compile time and we may should choose " .
That's my personal opinion. If you think there is any fault in my opinion or you have better solution, please tell me , Thanks a lot.
At 2019-06-23 21:51:40, "Domingo Alvarez Duarte" notifications@github.com wrote:
Also why not allow optional semi colon ?
It would allow share code between languages (C/C++/Java).
Cheers !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
@structure-charger They take up exactly the same size. They're both a byte
Most helpful comment
Python as well.
This decision is not final.
In my opinion they look cleaner and don't require shift on most keyboards.