<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 5, 2016 at 5:32 PM, angel via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wednesday, 5 October 2016 at 02:11:14 UTC, Meta wrote:<br>
</span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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:<br>
<br>
- In web programming where "body" is a required tag in any valid HTML document. Ex:<br>
- It is a name commonly used for XML tags and/or attributes<br>
- Physics simulations as well in astronomical contexts ("planetary bodyies", etc.)<br>
- Video games, such as referring to the player character's body<br>
</blockquote>
<br>
<br></div></div>
Really, why do we need a _body_ ?<br>
We have pre-condition and post-condition (in and out), everything else is a body.<br>
It is simply inconsistent - a regular function with no in and out blocks has no body block. Now one adds a pre-condition (and / or post-condition) - whoop - one needs to wrap the whole function body ... well in a body expression.<br>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Recently I've had to use scope_ a lot more often than body_ but reserved keywords are really annoying, so the less we have the better :D</div></div>