On Wednesday, 5 October 2016 at 02:11:14 UTC, Meta wrote:
I'm currently writing up a DIP to propose removing `body` as a keyword to allow it to be used for variable names, functions, etc. I'm looking for examples and contexts where `body` would normally be used as a variable, function name, alias, etc. This is what I have come up with off the top of my head:

- In web programming where "body" is a required tag in any valid HTML document. Ex:
- It is a name commonly used for XML tags and/or attributes
- Physics simulations as well in astronomical contexts ("planetary bodyies", etc.)
- Video games, such as referring to the player character's body

Physics libraries absolutely.

https://github.com/d-gamedev-team/dchip/blob/55f43e5f0cf67c8bc190711b69eb16230fa6188e/src/dchip/cpBody.d#L184
https://github.com/d-gamedev-team/dbox/blob/6f81fe065abec1e7def44fc777c5d8e9da936104/examples/demo/tests/bodytypes.d#L103

And in various C / C++ libraries. It's rather annoying that body is taken, it's a fairly rarely used keyword in D but often used in other languages.

Reply via email to