What is the purpose of double underscoring after a single underscore as a parameter to a function / class method?

In my Polymer Dart 1.0.0 study, which I found for events and observation methods, I am forced to use this pattern

@reflectable
void someEvent([_, __]) {
    ...
}

or by observer

@Observe('someField')
void someFieldChanged([_, __]) {
    ...
}

I understand why square brackets are needed, additional parameters, I also understand that if you do not care about the parameters passed, you can represent this parameter with an underscore. I was struck by the examples, which I considered as a double underscore __, as the second character between the square brackets. When I again tried to use only one underscore, I get a duplicate of the formal parameter error. Is there a reason why the second parameter that you do not need should be different from the first? By this logic, if I include the third, does this mean that it should be a triple underline ___?

Thanks.

+4
source share
1 answer

. _ __ a . _ . , _, - __. _, __, ___... _1, _2, _3...

+5

Source: https://habr.com/ru/post/1611763/


All Articles