Take the 2-minute tour ×
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It's 100% free, no registration required.

In the context of computer programming, how to say to uncomment?

For instance, here I uncomment a line:

// Before
// myvar = 3;

// After
myvar = 3;

I would use コメントアウトする, but I also see コメントじゃなくする, 非コメント化する, コメントを外す in use.

share|improve this question
4  
To me, to "comment out" something is to turn it into a comment! –  Zhen Lin Feb 18 '13 at 8:17
    
@ZhenLin: I wrote it in that meaning too. I understand it might have been ambiguous, so I removed that sentence as it was not adding any new information. –  Nicolas Raoul Feb 18 '13 at 9:28
6  
eow.alc.co.jp/search?q=uncomment&ref=sa –  ssb Feb 18 '13 at 9:49
    
    
コメントをけす?​​​​​​​​​​​​​​​​ –  Pacerier Feb 28 '13 at 8:16
add comment

2 Answers 2

up vote 3 down vote accepted

You present four choices:

  1. I don't think you should use コメントアウトする to mean "uncomment". It properly means "comment out", but unfortunately, the meaning may not be obvious unless you're familiar with the English term. It has caused confusion in the past, so if I used the term at all, I'd be prepared to clarify by saying either コメントにする or コメントにして無視されるようにする.

  2. I would also avoid コメントじゃなくする, simply because it seems rare.

  3. [非]{ひ}コメント[化]{か}する likewise doesn't seem terribly common, though I'd choose it over the じゃなく version in choice #2.

  4. コメントを[外]{はず}す is my pick out of the choices you presented. It appears to be widely used, it's listed in Weblio and ALC, and I think it's unlikely to cause confusion.

    コメントアウトを外す is an alternative form, but I see no reason to prefer it over the shorter version.

Finally, there is another common choice you failed to mention:

  1. コメント(を)[削除]{さくじょ}する. It's commonly used and listed in Weblio and ALC. That said, in other contexts like blogs, forums, and so on, コメントを削除する means to remove a comment! I'd choose コメントを外す over this because of the potential ambiguity, though my guess is that in practice it's unlikely to cause confusion.

    コメントアウトを削除する is a longer alternative, but like before, I see no reason to prefer it over the shorter version.

In the end, my choice for "uncomment" is コメントを外す.

share|improve this answer
    
I spent a while researching this, but as always, I appreciate corrections! –  snailboat Feb 19 '13 at 11:22
add comment

Consensus in the ALC corpus (all technical entries that match your example case) would be for コメント解除【かいじょ】する.

Ex:

デフォルトの/etc/rsyncd.conf設定ファイルを編集し、[gentoo-portage]の部分をコメント解除し、addressオプションを追加します。

GPMを使用する前に、マウスの接続場所とプロトコルに対応する行をコメント解除する必要があります。

One example uses コメントを外す【はずす】, which also makes sense, but seems less common:

ローカルのアプリケーションしかMySQLデータベースにアクセスする必要がなければ、/etc/mysql/my.cnfにおいて下記ラインのコメントをはずして下さい。

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.