It may be too late to reconsider commenting syntax but I just thought I’d throw this out there… I’ve been thinking about it for some time. In order to type #= =# I have to use:
(1) left hand pinky + index
(2) right hand pinky + index
(3) grab the mouse and select the end of the line (In the case the text is already written)
(4) move right hand back to keyboard and use pinky + index
(5) left hand pinky + index
I live in a Spanish-Language country and so the keyboard layout is a bit different, mainly for punctuation. I can’t remember where everything is on the English language keyboard so this may not be a problem for some.
I really like JS comment syntax ( /* */ ) just for its ease of use …the two keys are right beside each other.
Of course, I can continue using #= =# if that’s the way it has to be …also I recognise that many editors have Ctrl/cmd + / (as per Juno), which is slightly more convenient but still requires both hands. I’m not sure if this effects enough people to merit more attention but thought I’d mention it.
Languages that have more letters than English usually make compromises to fit on a standard-size keyboard and sacrifice less frequently used punctuation characters first. Eg many European languages have widely used layouts that require acrobatics for []{}#| etc.
There is no good solution that satisfies everyone, so many programmers just use an US keyboard layout, even if their native language is not English.
Alternatively, a reasonable editor should allow convenient shortcuts for everything.
Hello, I’m french and understand your concern, after years of coding with a french azerty keyboard, I move to a regular english qwerty and I’ve never regretted it.
I know you’ve ñ on spanish keyboards it’s just “alt + n” on an english internationnal keyboard.
Otherwise use a shortcut in your ide for commenting code, in atom it’s “ctrl + /” for example.
[Troll] don’t use comments they’re code smell [/Troll]
Thanks for sharing your thoughts guys , I guess next time I visit the family I will throw an English language keyboard in my bag before coming home. Until then I’ll use the IDE short cut.
I think we could just remove multiline comments. Multiple single line comments are just as easy to add with most editors, and the fact that they are only used 34 times in Base supports this move.
The Spanish keyboard (QWERTY - Wikipedia) needs AltGr+3 (“#”), followed by Shift+0 (“=”) to typeset “#=”. This is slightly more complex than on my Norwegian keyboard, where I type Shift+3 (“#”) followed by Shift+0 (“=”) – which is relatively straightforward for touch typists. I realize that the Shift key is easier to reach than the AltGr key (two shift keys + easier to reach).
The Latin American keyboard (QWERTY - Wikipedia) needs Shift+3 to typeset “#”, just like my Norwegian keyboard, and Shift+0 for “=”. Thus, fairly easy for a touch typist.
The fact that these are nesting makes them very convenient for me. Yes, #( ... )# would have been better (@StefanKarpinski v1.0 hasn’t landed yet - yolo ).
More importantly, someone (I think maybe Jameson?) pointed out you can handily use so-called “multiline” comments within a single line in complex function calls to explain what’s going on
foo(#= person =# "Andy", #= age =# missing, #= favorite language =# "Julia", ...)
Particularly handy in scripts with a lot of hard-coded values.
On the international keyboard issue - could we maybe have some tab-completions for the REPL and Atom/VSCode/etc for some of our more “obscure” ASCII characters/combos?
So far I only worked on german and a bit on hungarian layouts (I personally use US layouts) and writing curly braces, brackets or almost any other kinds of (not-so-)special characters is just not as ergonomic as for example on the US one. I think for coding the US is still one of the better ones and yes, I’d definitely recommend using that one for all the languages I have worked with so far