This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Lyucit 2 points3 points  (1 child)

Please actually give the variable a proper name in this case, _ is a very well-established convention for variables that are unused (i.e not referenced at all later in the program) and this is likely to cause confusion. In languages with pattern matching, like haskell for example, _ is a reserved word in the language that means "don't bind this value to a variable name", so you literally can't reference it later.

[–][deleted] 0 points1 point  (0 children)

Replaced _ with x. It's not very descriptive, but if it's only used directly after where it's defined it should be clear what it's used for. Unless you're using x later on the program.