scovich commented on PR #9454:
URL: https://github.com/apache/arrow-rs/pull/9454#issuecomment-3977950572

   I did some exploring, it looks like lots of other similar macros (including 
`downcast_primitive!`) accept `$($value),+` as a way to avoid multiple match 
arms -- even tho it leads to weird syntax IMO. In particular, those macros do 
_NOT_ accept tuples. So `downcast_primitive_array!` -- which accepts both tuple 
and list form -- has to convert `(a, b)` into `a, b` when invoking 
`downcast_primitive!`.
   
   I also figured out why there are both expr and block versions -- the macro 
infra requires a comma between `expr` and `pat` -- even if the caller was 
trying to pass `value => {...}`. In contrast, `block` requires the brackets 
`{...}` and so the comma is no longer necessary. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to