2 ms·
> This is not a name, it's the specific choice not to assign it to any name Yeah, it's the same in c#. This is noticeable when in the same scope you can have m
by SideburnsOfDoom 2y ago
> This is not a name, it's the specific choice not to assign it to any name
Yeah, it's the same in c#. This is noticeable when in the same scope you can have multlple "_" vars. If these were actual names, they would be a name clash.
One of the uses is take some parts of a tuple return and ignore the others.
e.g.
var (thingIwant, _, _, _) = FunctionThaReturnsATupleOfFourThings();
There are three "_" in that expression, and they are different vars with different types. They don't really have the same name, they don't have names at all.