# \#= Commenting =# very inconvenient on Spanish language keyboard

**URL:** <https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850>\
**Category:** Internals & Design\
**Created:** [December 19, 2017, 3:55pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850 "2017-12-19T15:55:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![TravisA9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/travisa9/32/357_2.png) [@TravisA9](https://discourse.julialang.org/u/TravisA9)\
**Post date:** [December 19, 2017, 3:55pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/1 "2017-12-19T15:55:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 19, 2017, 4:20pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/2 "2017-12-19T16:20:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![apieum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/apieum/32/2928_2.png) [@apieum](https://discourse.julialang.org/u/apieum)\
**Post date:** [December 19, 2017, 4:23pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/3 "2017-12-19T16:23:22Z")

</div>

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](https://blogs.agilefaqs.com/2013/03/07/inline-comments-in-the-code-is-a-smell-but-document-the-why/) 😄 [/Troll]

---

<div class="post-metadata">

**Author:** ![TravisA9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/travisa9/32/357_2.png) [@TravisA9](https://discourse.julialang.org/u/TravisA9)\
**Post date:** [December 19, 2017, 4:32pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/4 "2017-12-19T16:32:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 19, 2017, 4:34pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/5 "2017-12-19T16:34:24Z")

</div>

I really hate this syntax and wish we hadn’t added it to the language at all. Or if we did that we’d used `#(` and `)#` or something like that.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 19, 2017, 4:39pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/6 "2017-12-19T16:39:13Z")

</div>

My impression is that it is used sparingly, to comment out code temporarily. On `master`,

```bash
$ grep -r "#=" . | wc -l
34

```

Since dangling `,`s are allowed, I usually just break a line and use `#`.

---

<div class="post-metadata">

**Author:** ![TravisA9](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/travisa9/32/357_2.png) [@TravisA9](https://discourse.julialang.org/u/TravisA9)\
**Post date:** [December 19, 2017, 5:03pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/7 "2017-12-19T17:03:49Z")

</div>

It’s probably worth mentioning that although `#( comment )#` looks nice, it doesn’t really help avoid the keyboard “acrobatics” mentioned above.

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [December 19, 2017, 5:08pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/8 "2017-12-19T17:08:40Z")

</div>

My official recommendation is not to use multiline comments 🙂

---

<div class="post-metadata">

**Author:** ![shorty66](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shorty66/32/3254_2.png) [@shorty66](https://discourse.julialang.org/u/shorty66)\
**Post date:** [December 19, 2017, 5:28pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/9 "2017-12-19T17:28:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [December 19, 2017, 5:33pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/10 "2017-12-19T17:33:47Z")

</div>

> [@shorty66](#):
>
> I think we could just remove multiline comments.

Multiline comments are very handy and much less visual offending than multiple single line comments.

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [December 19, 2017, 5:50pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/11 "2017-12-19T17:50:33Z")

</div>

Maybe I am just bad at debugging but I love multi line comments. Not having those in R is a major source of annoyance.

---

<div class="post-metadata">

**Author:** ![shorty66](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shorty66/32/3254_2.png) [@shorty66](https://discourse.julialang.org/u/shorty66)\
**Post date:** [December 19, 2017, 6:08pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/12 "2017-12-19T18:08:48Z")

</div>

okay, well i think having them doesn’t hurt either. Sorry for the noise.

---

<div class="post-metadata">

**Author:** ![BLI](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bli/32/37206_2.png) [@BLI](https://discourse.julialang.org/u/BLI)\
**Post date:** [December 19, 2017, 10:27pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/13 "2017-12-19T22:27:58Z")

</div>

The Spanish keyboard ([QWERTY - Wikipedia](https://en.wikipedia.org/wiki/QWERTY#Spanish)) 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](https://en.wikipedia.org/wiki/QWERTY#Hispanic_America)) needs Shift+3 to typeset “#”, just like my Norwegian keyboard, and Shift+0 for “=”. Thus, fairly easy for a touch typist.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [December 19, 2017, 10:35pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/14 "2017-12-19T22:35:34Z")

</div>

It’s not just for multi-line comments, though! You can do

```julia
julia> a = #= hello =# 5
5

```

which looks a bit ridiculous, but it can be nice if you want to throw in an aside in a complicated expression.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [December 20, 2017, 3:51am UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/15 "2017-12-20T03:51:28Z")

</div>

For background on multi-line comments in Julia, see this lengthy discussion: [https://github.com/JuliaLang/julia/issues/69](https://github.com/JuliaLang/julia/issues/69)

---

<div class="post-metadata">

**Author:** ![yurivish](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yurivish/32/307_2.png) [@yurivish](https://discourse.julialang.org/u/yurivish)\
**Post date:** [December 20, 2017, 9:03am UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/16 "2017-12-20T09:03:10Z")

</div>

I also find multiline (nestable!) comments incredibly useful.

---

<div class="post-metadata">

**Author:** ![andyferris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/andyferris/32/235_2.png) [@andyferris](https://discourse.julialang.org/u/andyferris)\
**Post date:** [December 20, 2017, 11:10am UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/17 "2017-12-20T11:10:26Z")

</div>

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

```julia
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?

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [December 20, 2017, 11:46am UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/18 "2017-12-20T11:46:33Z")

</div>

Every good editor has the ability to customise a shortcut for (un)commenting. Here is a plugin for Vim: [https://github.com/tomtom/tcomment\_vim](https://github.com/tomtom/tcomment_vim)

for me it’s the standard `gc` and `gcc` letters, which are easily accessible on all kinds of latin keyboards 😉

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [December 20, 2017, 12:25pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/19 "2017-12-20T12:25:00Z")

</div>

Oh God I hope “just use a US keyboard no matter where you are” never becomes the official recommendation.

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [December 20, 2017, 12:48pm UTC](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850/20 "2017-12-20T12:48:07Z")

</div>

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 😉

[Next page](https://discourse.julialang.org/t/commenting-very-inconvenient-on-spanish-language-keyboard/7850.md?page=2)
