1 Jan 2011 01:07
Re: Left & Right Double Quote Marks?
On Jan 1, 12:40 am, darenw <darenscotwil...@...> wrote: > String literals in Go use the old standard ASCII 0x22 for double > quotes, as in fmt.Print("hey!"). It has always bothered me that, in > all languages I've known since 1970s BASIC onward, the exact same > character is used for the start and end of string literals. So the observed pattern probably have some reason and it may be not only rigidity of the language designers. > I wonder if it could work to use the directional quote marks defined > in UTF > 0x201C and 0x201D? Of course this is easy to tap into an old "hello > world" source. The compiler tells me "invalid identifier character > 0x201c". The compiler obeys the specs. No surprise it mumbles about invalid stuff if it's out of the specs. > Does this idea make sense? IMO not. > What are the pros and cons of this? I'm not aware of pros, but the cons is entering daily hundreds of non- ASCII Unicode codepoints using a keyboard which doesn't have them available as a simple shift-key stroke, but only as "magic" sequences of (a possibly lot) more keystrokes. The later is a bit harder to enter without looking at the keyboard. > Are > all programmers in all languages doomed to be forever confined to old > ASCII characters? They're IMO not doomed. Programmers entering daily few thousands characters (or more) of source code do understandably like them to be found ready made on a common PC keyboard. Otherwise they will slow down significantly. > Who do I bribe to add this feature?(Continue reading)
RSS Feed