Examples Wanted: Usages of "body" as a Symbol Name

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 5 23:38:06 PDT 2016


On Thursday, October 06, 2016 05:25:19 Patrick Schluter via Digitalmars-d 
wrote:
> Sorry, I find the actual body without body keyword much more
> natural (i.e. intuitive) than having the body requiring it only
> when there are contracts. It would be even consistent with the
> template syntax where 1 parenthesis pair is runtime parameter and
> when there are 2 pairs template+runtime. The genious idea of D
> was to find that template parameter didn't require the
> abomination of alternate parenthesis < >. In the same vein, I'm
> sure that the body keyword is superfluous as the contract
> statements are unambiguously marked. That body keyword is so
> "un-D-ic" as it gets.

Yeah, the fact that the body keyword is not required normally but is when
you have in/out contracts is annoying, completely aside from what the
keyword used is. I don't care much about losing the name body to a keyword,
but I definitely don't like that you have to use a keyword for a function
body when you have in/out contracts. It doesn't seem like it should be
necessary, and it's inconsistent with the normal case.

- Jonathan M Davis



More information about the Digitalmars-d mailing list