cholla-hydro / cholla

A GPU-based hydro code
https://github.com/cholla-hydro/cholla/wiki
MIT License
60 stars 32 forks source link

Edit grid_enum comments #379

Closed alwinm closed 3 months ago

alwinm commented 3 months ago

edit grid_enum comments (they were re-arranged by a linter at some point)

At the moment I'm not sure I have the bandwidth to do due diligence on this PR but I noticed it and thought I'd at least attempt clarify the comments I had made a while back.

bcaddy commented 3 months ago

This looks good to me. I'll note though that you can name enums rather than putting them in a namespace.

alwinm commented 3 months ago

This looks good to me. I'll note though that you can name enums rather than putting them in a namespace.

Named unscoped enums have the strange behavior that you can refer to them outside of their name, so my habit is to always make sure they are inside of some namespace.

https://tio.run/##jY5BCsIwFET3c4pPRWghgutGPYIncJMmUQLmp6QJgtKzx0SXbtwNb@bB6Hne3bQuZeNY37OxdNBLMi6cAFjOns7KW3rhaWMQCGwF0qMmJTAJaAGDVQKOE3nluB/qlmiOFVz7bmvowp1Qg/yF0wc2UdGR9vJPrf0Zx28VbcqRm4u1lDc

bcaddy commented 3 months ago

Thanks for letting me know, that is some very weird behavior.