10

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.

5

2 Answers 2

4

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 コメントを外す.

1
  • I spent a while researching this, but as always, I appreciate corrections!
    – user1478
    Feb 19, 2013 at 11:22
3

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において下記ラインのコメントをはずして下さい。

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .